Home
last modified time | relevance | path

Searched refs:SkTPin (Results 1 – 25 of 32) sorted by relevance

12

/external/skia/tools/
Dimgslice.cpp90 top = bottom = SkTPin(FLAGS_row, 0, bitmap.height()-1); in main()
91 FLAGS_min = left = SkTPin(FLAGS_min, 0, bitmap.width()-1); in main()
92 FLAGS_max = right = SkTPin(FLAGS_max, left, bitmap.width()-1); in main()
95 left = right = SkTPin(FLAGS_column, 0, bitmap.width()-1); in main()
96 FLAGS_min = top = SkTPin(FLAGS_min, 0, bitmap.height()-1); in main()
97 FLAGS_max = bottom = SkTPin(FLAGS_max, top, bitmap.height()-1); in main()
/external/skia/src/core/
DSkFontStyle.cpp21 fUnion.fR.fWeight = SkTPin<int>(weight, kInvisible_Weight, kExtraBlack_Weight); in SkFontStyle()
22 fUnion.fR.fWidth = SkTPin<int>(width, kUltraCondensed_Width, kUltraExpanded_Width); in SkFontStyle()
23 fUnion.fR.fSlant = SkTPin<int>(slant, kUpright_Slant, kOblique_Slant); in SkFontStyle()
DSkBitmap.cpp253 fPixelRefOrigin.set(SkTPin(dx, 0, info.width()), SkTPin(dy, 0, info.height())); in setPixelRef()
/external/skia/experimental/svg/model/
DSkSVGNode.cpp70 SkSVGNumberType(SkTPin<SkScalar>(opacity.value(), 0, 1))); in setFillOpacity()
79 SkSVGNumberType(SkTPin<SkScalar>(opacity.value(), 0, 1))); in setOpacity()
88 SkSVGNumberType(SkTPin<SkScalar>(opacity.value(), 0, 1))); in setStrokeOpacity()
DSkSVGStop.cpp23 fStopOpacity = SkTPin<SkScalar>(opacity.value(), 0, 1); in setStopOpacity()
DSkSVGLinearGradient.cpp101 pos->push_back(SkTPin(ltx.resolve(stop.offset(), SkSVGLengthContext::LengthType::kOther), in collectColorStops()
/external/skia/src/effects/
DSkRRectsGaussianEdgeMaskFilter.cpp73 return SkTPin(halfW * invRad - scaledDist, 0.0f, 1.0f); in compute_rrect_normalized_dist()
79 SkVector v = { 1.0f - SkTPin(xDist, 0.0f, 1.0f), 1.0f - SkTPin(yDist, 0.0f, 1.0f) }; in compute_rrect_normalized_dist()
80 return SkTPin(1.0f - v.length(), 0.0f, 1.0f); in compute_rrect_normalized_dist()
111 return SkTPin(SkTMin(xDist, yDist), 0.0f, 1.0f); // perpendicular distance in compute_rrect_normalized_dist()
129 return SkTPin(coneDist, 0.0f, 1.0f); in compute_rrect_normalized_dist()
175 SkScalar factor = SkTPin(vec.length(), 0.0f, 1.0f); in filterMask()
DSkTableMaskFilter.cpp94 table[i] = SkTPin(sk_float_round2int(powf(x, g) * 255), 0, 255); in MakeGammaTable()
DSkMagnifierImageFilter.cpp436 int x_val = SkTPin(bounds.x() + SkScalarFloorToInt(x_interp), 0, inputBM.width() - 1); in onFilterImage()
437 int y_val = SkTPin(bounds.y() + SkScalarFloorToInt(y_interp), 0, inputBM.height() - 1); in onFilterImage()
DSkMatrixConvolutionImageFilter.cpp132 x = SkTPin(x, bounds.fLeft, bounds.fRight - 1); in fetch()
133 y = SkTPin(y, bounds.fTop, bounds.fBottom - 1); in fetch()
/external/skia/include/gpu/
DGrColor.h240 SkTPin<unsigned>(static_cast<unsigned>(fRGBA[0] * 255.0f + 0.5f), 0, 255), in toGrColor()
241 SkTPin<unsigned>(static_cast<unsigned>(fRGBA[1] * 255.0f + 0.5f), 0, 255), in toGrColor()
242 SkTPin<unsigned>(static_cast<unsigned>(fRGBA[2] * 255.0f + 0.5f), 0, 255), in toGrColor()
243 SkTPin<unsigned>(static_cast<unsigned>(fRGBA[3] * 255.0f + 0.5f), 0, 255)); in toGrColor()
/external/skia/gm/
Danimatedimageblurs.cpp107 fPos.fX = SkTPin<SkScalar>(fPos.fX, 0.0f, kWidth); in update()
111 fPos.fY = SkTPin<SkScalar>(fPos.fY, 0.0f, kHeight); in update()
/external/skia/samplecode/
DSampleSVGPong.cpp157 fTimeScale = SkTPin(fTimeScale - 0.1f, kTimeScaleMin, kTimeScaleMax); in onQuery()
160 fTimeScale = SkTPin(fTimeScale + 0.1f, kTimeScaleMin, kTimeScaleMax); in onQuery()
259 return sign * SkTPin(fuzzed, kBallSpeedMin, kBallSpeedMax); in fuzzBallSpeed()
/external/skia/src/effects/gradients/
DSkClampRange.h24 #define SkScalarPinToGradFixed(x) SkScalarToFixed3232(SkTPin(x, \
DSk4fGradientBase.cpp53 ? SkTPin(fPos[curr], prevPos, lastPos) in iterate()
54 : SkTPin(fPos[curr], lastPos, prevPos); in iterate()
DSkLinearGradient.cpp180 rec[i].fPos = SkTPin(shader.fOrigPos[i], rec[i - 1].fPos, 1.0f); in LinearGradientContext()
828 const float pinFx = SkTPin(fx, 0.0f, 1.0f); in shade4_clamp()
/external/skia/include/private/
DSkFloatBits.h75 return (int32_t)SkTPin<double>(x, SK_MinS32, SK_MaxS32); in pin_double_to_int()
DSkFixed.h87 SkToS32(SkTPin<int64_t>((SkLeftShift((int64_t)(numer), 16) / (denom)), SK_MinS32, SK_MaxS32))
/external/skia/tests/
DCPlusPlusEleven.cpp36 static constexpr int y = SkTPin<int>(100, 0, 10); in DEF_TEST()
DInterpolatorTest.cpp62 REPORTER_ASSERT(reporter, SkScalarNearlyEqual(SkTPin(0.f, val, 1.f), in DEF_TEST()
/external/skia/src/gpu/
DGrColorSpaceXform.cpp126 result.fRGBA[i] = SkTPin(result.fRGBA[i], 0.0f, 1.0f); in apply()
/external/skia/include/core/
DSkScalar.h130 return SkTPin(x, min, max); in SkScalarPin()
DSkTypes.h391 template <typename T> static constexpr const T& SkTPin(const T& value, const T& min, const T& max) { in SkTPin() function
/external/skia/src/effects/shadows/
DSkSpotShadowMaskFilter.cpp237 float zRatio = SkTPin(fOccluderHeight / (fLightPos.fZ - fOccluderHeight), 0.0f, 0.95f); in directFilterRRectMaskGPU()
/external/skia/src/utils/
DSkShadowUtils.cpp503 float zRatio = SkTPin(occluderHeight / (devLightPos.fZ - occluderHeight), 0.0f, 0.95f); in DrawShadow()

12