Home
last modified time | relevance | path

Searched refs:SkScalarRoundToInt (Results 1 – 25 of 83) sorted by relevance

1234

/third_party/skia/src/core/
DSkColor.cpp80 U8CPU v_byte = SkScalarRoundToInt(v * 255); in SkHSVToColor()
89 unsigned p = SkScalarRoundToInt((SK_Scalar1 - s) * v * 255); in SkHSVToColor()
90 unsigned q = SkScalarRoundToInt((SK_Scalar1 - (s * f)) * v * 255); in SkHSVToColor()
91 unsigned t = SkScalarRoundToInt((SK_Scalar1 - (s * (SK_Scalar1 - f))) * v * 255); in SkHSVToColor()
DSkImageFilterTypes.cpp18 return SkIVector::Make(SkScalarRoundToInt(v.fX), SkScalarRoundToInt(v.fY)); in map_as_vector()
111 return SkIPoint::Make(SkScalarRoundToInt(p.fX), SkScalarRoundToInt(p.fY)); in map()
DSkDraw_atlas.cpp45 ctx->rgba[0] = SkScalarRoundToInt(rgba[0]*255); ctx->r = rgba[0]; in load_color()
46 ctx->rgba[1] = SkScalarRoundToInt(rgba[1]*255); ctx->g = rgba[1]; in load_color()
47 ctx->rgba[2] = SkScalarRoundToInt(rgba[2]*255); ctx->b = rgba[2]; in load_color()
48 ctx->rgba[3] = SkScalarRoundToInt(rgba[3]*255); ctx->a = rgba[3]; in load_color()
DSkCompressedDataUtils.cpp174 uint8_t r8 = SkScalarRoundToInt(t * SkGetPackedR32(col0) + (1.0f - t) * SkGetPackedR32(col1)); in lerp()
175 uint8_t g8 = SkScalarRoundToInt(t * SkGetPackedG32(col0) + (1.0f - t) * SkGetPackedG32(col1)); in lerp()
176 uint8_t b8 = SkScalarRoundToInt(t * SkGetPackedB32(col0) + (1.0f - t) * SkGetPackedB32(col1)); in lerp()
DSkBlurMask.cpp408 dst->fBounds.setLTRB(SkScalarRoundToInt(src.fLeft - pad), in BlurRect()
409 SkScalarRoundToInt(src.fTop - pad), in BlurRect()
410 SkScalarRoundToInt(src.fRight + pad), in BlurRect()
411 SkScalarRoundToInt(src.fBottom + pad)); in BlurRect()
/third_party/skia/tests/
DPathCoverageTest.cpp29 int idx = SkAbs32(SkScalarRoundToInt(dx)); in cheap_distance()
30 int idy = SkAbs32(SkScalarRoundToInt(dy)); in cheap_distance()
81 return estimate_pointCount(SkScalarRoundToInt(distance)); in quadraticPointCount_CE()
DPathOpsConicIntersectionTest.cpp92 SkScalarRoundToInt(bounds.width()), SkScalarRoundToInt(bounds.height()))); in writePng()
129 SkScalarRoundToInt(SkDoubleToScalar(bounds.width())), in writeDPng()
130 SkScalarRoundToInt(SkDoubleToScalar(bounds.height())))); in writeDPng()
266 SkScalarRoundToInt(SkDoubleToScalar(bounds.width())), in writeFrames()
267 SkScalarRoundToInt(SkDoubleToScalar(bounds.height())))); in writeFrames()
DPathOpsOpLoopThreadedTest.cpp17 int asInt = SkScalarRoundToInt(x); in add_point()
24 asInt = SkScalarRoundToInt(y); in add_point()
/third_party/skia/src/codec/
DSkScalingCodec.h23 dim.fWidth = std::max(1, SkScalarRoundToInt(desiredScale * dim.fWidth)); in onGetScaledDimensions()
24 dim.fHeight = std::max(1, SkScalarRoundToInt(desiredScale * dim.fHeight)); in onGetScaledDimensions()
/third_party/skia/tools/skdiff/
Dskdiff_html.cpp128 if (SkScalarRoundToInt(diff.fAverageMismatchA) > 0) { in print_label_cell()
130 stream->writeDecAsText(SkScalarRoundToInt(diff.fAverageMismatchA)); in print_label_cell()
134 stream->writeDecAsText(SkScalarRoundToInt(diff.fMaxMismatchA)); in print_label_cell()
141 stream->writeDecAsText(SkScalarRoundToInt(MAX3(diff.fAverageMismatchR, in print_label_cell()
/third_party/skia/bench/
DBlurRectBench.cpp85 name.printf("blurrect_direct_%d", SkScalarRoundToInt(rad)); in BlurRectDirectBench()
137 name.printf("blurrect_boxfilter_%d", SkScalarRoundToInt(rad)); in BlurRectBoxFilterBench()
165 name.printf("blurrect_gaussian_%d", SkScalarRoundToInt(rad)); in BlurRectGaussianBench()
/third_party/skia/samplecode/
DSampleMixer.cpp76 return fRect.contains(SkScalarRoundToInt(x), in onFindClickHandler()
77 SkScalarRoundToInt(y)) ? new Click() : nullptr; in onFindClickHandler()
/third_party/skia/include/core/
DSkSize.h78 SkISize toRound() const { return {SkScalarRoundToInt(fWidth), SkScalarRoundToInt(fHeight)}; } in toRound()
/third_party/skia/modules/skottie/src/effects/
DVenetianBlindsEffect.cpp120 const SkColor c01 = SkColorSetA(SK_ColorWHITE, SkScalarRoundToInt(g01 * 0xff)), in onMakeMask()
121 c23 = SkColorSetA(SK_ColorWHITE, SkScalarRoundToInt(g23 * 0xff)), in onMakeMask()
DFractalNoiseEffect.cpp431 const auto scale = (SkScalarRoundToInt(fUniformScaling) == 1) in shaderMatrix()
451 switch (SkScalarRoundToInt(fNoiseType)) { in noiseFilter()
460 switch (SkScalarRoundToInt(fFractalType)) { in noiseFractal()
/third_party/skia/src/effects/
DSkDiscretePathEffect.cpp83 uint32_t seed = fSeedAssist ^ SkScalarRoundToInt(meas.getLength()); in onFilterPath()
101 int n = SkScalarRoundToInt(length / fSegLength); in onFilterPath()
/third_party/skia/gm/
Dpictureimagefilter.cpp81 SkISize dim = { SkScalarRoundToInt(r.width()), SkScalarRoundToInt(r.height()) }; in make()
Dcomplexclip2.cpp138 return SkISize::Make(SkScalarRoundToInt(fTotalWidth), in onISize()
139 SkScalarRoundToInt(fTotalHeight)); in onISize()
Dwacky_yuv_formats.cpp375 yuv[0] = SkTPin(SkScalarRoundToInt(mtx[ 0]*r + mtx[ 1]*g + mtx[ 2]*b + mtx[ 4]*255), 0, 255); in convert_rgba_to_yuva()
376 yuv[1] = SkTPin(SkScalarRoundToInt(mtx[ 5]*r + mtx[ 6]*g + mtx[ 7]*b + mtx[ 9]*255), 0, 255); in convert_rgba_to_yuva()
377 yuv[2] = SkTPin(SkScalarRoundToInt(mtx[10]*r + mtx[11]*g + mtx[12]*b + mtx[14]*255), 0, 255); in convert_rgba_to_yuva()
536 static uint16_t flt_2_uint16(float flt) { return SkScalarRoundToInt(flt * 65535.0f); } in flt_2_uint16()
592 Y = SkScalarRoundToInt((*planes.fYFull.getAddr8(x, y) / 255.0f) * 1023.0f); in create_YUV()
593 U = SkScalarRoundToInt((*planes.fUFull.getAddr8(x, y) / 255.0f) * 1023.0f); in create_YUV()
594 V = SkScalarRoundToInt((*planes.fVFull.getAddr8(x, y) / 255.0f) * 1023.0f); in create_YUV()
595 A = SkScalarRoundToInt((*planes.fAFull.getAddr8(x, y) / 255.0f) * 3.0f); in create_YUV()
/third_party/skia/tools/
Dskottie2movie.cpp83 dim = { FLAGS_set_dst_width, SkScalarRoundToInt(scale * dim.height()) }; in main()
86 const int frames = SkScalarRoundToInt(duration * fps); in main()
/third_party/skia/src/gpu/
DGrClip.h166 return aa == GrAA::kNo ? SkScalarRoundToInt(v - kHalfPixelRoundingTolerance)
171 return aa == GrAA::kNo ? SkScalarRoundToInt(v + kHalfPixelRoundingTolerance)
/third_party/skia/src/effects/imagefilters/
DSkOffsetImageFilter.cpp80 return SkIPoint::Make(SkScalarRoundToInt(vec.fX), SkScalarRoundToInt(vec.fY)); in map_offset_vector()
/third_party/skia/tools/gpu/
DYUVUtils.cpp32 uint8_t r = SkTPin(SkScalarRoundToInt(mtx[ 0]*y + mtx[ 1]*u + mtx[ 2]*v + mtx[ 4]*255), 0, 255); in convert_yuva_to_rgba()
33 uint8_t g = SkTPin(SkScalarRoundToInt(mtx[ 5]*y + mtx[ 6]*u + mtx[ 7]*v + mtx[ 9]*255), 0, 255); in convert_yuva_to_rgba()
34 uint8_t b = SkTPin(SkScalarRoundToInt(mtx[10]*y + mtx[11]*u + mtx[12]*v + mtx[14]*255), 0, 255); in convert_yuva_to_rgba()
/third_party/skia/modules/svg/src/
DSkSVGFeFlood.cpp24 return SkColorSetA(color, SkScalarRoundToInt(*floodOpacity * 255)); in resolveFloodColor()
/third_party/skia/src/shaders/
DSkPerlinNoiseShader.cpp50 : fWidth(std::min(SkScalarRoundToInt(w), SK_MaxS32 - kPerlinNoise)) in StitchData()
52 , fHeight(std::min(SkScalarRoundToInt(h), SK_MaxS32 - kPerlinNoise)) in StitchData()
83 fTileSize.set(SkScalarRoundToInt(tileVec.fX), SkScalarRoundToInt(tileVec.fY)); in PaintingData()
206 SkScalarRoundToInt((fGradient[channel][i].fX + 1) * kHalfMax16bits); in init()
208 SkScalarRoundToInt((fGradient[channel][i].fY + 1) * kHalfMax16bits); in init()

1234