Home
last modified time | relevance | path

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

1234567

/third_party/flutter/skia/docs/examples/
DImageInfo_makeAlphaType.cpp12 int red = SkScalarRoundToInt(255 * SkScalarAbs(SkScalarSin((x * 4 + y) * 0.03f))); in draw()
13 int blue = SkScalarRoundToInt(255 * SkScalarAbs(SkScalarCos((x * 3 + y) * 0.04f))); in draw()
14 int green = SkScalarRoundToInt(255 * SkScalarAbs(SkScalarSin((x * 2 + y) * 0.05f))); in draw()
15 int alpha = SkScalarRoundToInt(255 * SkScalarAbs(SkScalarCos((x * 1 + y) * 0.006f))); in draw()
DImageInfo_makeColorType.cpp12 int red = SkScalarRoundToInt(255 * SkScalarAbs(SkScalarSin((x * 4 + y) * 0.03f))); in draw()
13 int blue = SkScalarRoundToInt(255 * SkScalarAbs(SkScalarCos((x * 3 + y) * 0.04f))); in draw()
14 int green = SkScalarRoundToInt(255 * SkScalarAbs(SkScalarSin((x * 2 + y) * 0.05f))); in draw()
15 int alpha = SkScalarRoundToInt(255 * SkScalarAbs(SkScalarCos((x * 1 + y) * 0.006f))); in draw()
/third_party/flutter/skia/gm/
Dwacky_yuv_formats.cpp392 yuv[0] = SkScalarRoundToInt( range * Ey + off ); in convert_rgba_to_yuva_601_shared()
393 yuv[1] = SkScalarRoundToInt( 224 * Ecb + 128 ); in convert_rgba_to_yuva_601_shared()
394 yuv[2] = SkScalarRoundToInt( 224 * Ecr + 128 ); in convert_rgba_to_yuva_601_shared()
425 yuv[0] = SkScalarRoundToInt( 219 * Ey + 16 ); in convert_rgba_to_yuva_709()
426 yuv[1] = SkScalarRoundToInt( 224 * Ecb + 128 ); in convert_rgba_to_yuva_709()
427 yuv[2] = SkScalarRoundToInt( 224 * Ecr + 128 ); in convert_rgba_to_yuva_709()
434 …uint8_t r = SkScalarPin(SkScalarRoundToInt( 1.0f * y + 1.402f * v - 0.70374… in convert_yuva_to_rgba_jpeg()
436 …uint8_t g = SkScalarPin(SkScalarRoundToInt( 1.0f * y - (0.344136f * u) - (0.714136f * v) + 0.53121… in convert_yuva_to_rgba_jpeg()
438 …uint8_t b = SkScalarPin(SkScalarRoundToInt( 1.0f * y + 1.772f * u - 0.88947… in convert_yuva_to_rgba_jpeg()
446 …uint8_t r = SkScalarPin(SkScalarRoundToInt( 1.164f * y + 1.596f * v - 0.87075f * … in convert_yuva_to_rgba_601()
[all …]
/third_party/flutter/skia/src/core/
DSkBlurMask.cpp407 dst->fBounds.set(SkScalarRoundToInt(src.fLeft - pad), in BlurRect()
408 SkScalarRoundToInt(src.fTop - pad), in BlurRect()
409 SkScalarRoundToInt(src.fRight + pad), in BlurRect()
410 SkScalarRoundToInt(src.fBottom + pad)); in BlurRect()
421 dst->fBounds.set(SkScalarRoundToInt(src.fLeft), in BlurRect()
422 SkScalarRoundToInt(src.fTop), in BlurRect()
423 SkScalarRoundToInt(src.fRight), in BlurRect()
424 SkScalarRoundToInt(src.fBottom)); // restore trimmed bounds in BlurRect()
475 dst->fBounds.set(SkScalarRoundToInt(src.fLeft), in BlurRect()
476 SkScalarRoundToInt(src.fTop), in BlurRect()
[all …]
DSkDraw_atlas.cpp38 ctx->rgba[0] = SkScalarRoundToInt(rgba[0]*255); ctx->r = rgba[0]; in load_color()
39 ctx->rgba[1] = SkScalarRoundToInt(rgba[1]*255); ctx->g = rgba[1]; in load_color()
40 ctx->rgba[2] = SkScalarRoundToInt(rgba[2]*255); ctx->b = rgba[2]; in load_color()
41 ctx->rgba[3] = SkScalarRoundToInt(rgba[3]*255); ctx->a = rgba[3]; in load_color()
DSkColor.cpp79 U8CPU v_byte = SkScalarRoundToInt(v * 255); in SkHSVToColor()
88 unsigned p = SkScalarRoundToInt((SK_Scalar1 - s) * v * 255); in SkHSVToColor()
89 unsigned q = SkScalarRoundToInt((SK_Scalar1 - (s * f)) * v * 255); in SkHSVToColor()
90 unsigned t = SkScalarRoundToInt((SK_Scalar1 - (s * (SK_Scalar1 - f))) * v * 255); in SkHSVToColor()
/third_party/flutter/skia/src/gpu/
DGrDataUtils.cpp229 uint32_t r10 = SkScalarRoundToInt(colorf.fR * 1023.0f); in fill_buffer_with_color()
230 uint32_t g10 = SkScalarRoundToInt(colorf.fG * 1023.0f); in fill_buffer_with_color()
231 uint32_t b10 = SkScalarRoundToInt(colorf.fB * 1023.0f); in fill_buffer_with_color()
232 uint8_t a2 = SkScalarRoundToInt(colorf.fA * 3.0f); in fill_buffer_with_color()
267 uint16_t r16 = SkScalarRoundToInt(colorf.fR * 65535.0f); in fill_buffer_with_color()
272 uint16_t r16 = SkScalarRoundToInt(colorf.fR * 65535.0f); in fill_buffer_with_color()
273 uint16_t g16 = SkScalarRoundToInt(colorf.fG * 65535.0f); in fill_buffer_with_color()
282 uint64_t r16 = SkScalarRoundToInt(colorf.fR * 65535.0f); in fill_buffer_with_color()
283 uint64_t g16 = SkScalarRoundToInt(colorf.fG * 65535.0f); in fill_buffer_with_color()
284 uint64_t b16 = SkScalarRoundToInt(colorf.fB * 65535.0f); in fill_buffer_with_color()
[all …]
/third_party/flutter/skia/samplecode/
DSampleHT.cpp27 return SkColorSetARGB(SkScalarRoundToInt(f[0]), in floats_to_color()
28 SkScalarRoundToInt(f[1]), in floats_to_color()
29 SkScalarRoundToInt(f[2]), in floats_to_color()
30 SkScalarRoundToInt(f[3])); in floats_to_color()
DSampleMixer.cpp75 return fRect.contains(SkScalarRoundToInt(x), in onFindClickHandler()
76 SkScalarRoundToInt(y)) ? new Click() : nullptr; in onFindClickHandler()
159 return fRect.contains(SkScalarRoundToInt(x), in onFindClickHandler()
160 SkScalarRoundToInt(y)) ? new Click() : nullptr; in onFindClickHandler()
DSampleLayerMask.cpp31 int w = SkScalarRoundToInt(r.width()); in drawMask()
32 int h = SkScalarRoundToInt(r.height()); in drawMask()
/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()
/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()
/third_party/flutter/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()
/third_party/flutter/skia/src/codec/
DSkScalingCodec.h23 dim.fWidth = SkTMax(1, SkScalarRoundToInt(desiredScale * dim.fWidth)); in onGetScaledDimensions()
24 dim.fHeight = SkTMax(1, SkScalarRoundToInt(desiredScale * dim.fHeight)); in onGetScaledDimensions()
/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/flutter/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/flutter/skia/modules/skottie/src/
DSkottieValue.cpp74 return SkColorSetARGB(SkScalarRoundToInt(SkTPin(a, 0.0f, 1.0f) * 255), in As()
75 SkScalarRoundToInt(SkTPin(r, 0.0f, 1.0f) * 255), in As()
76 SkScalarRoundToInt(SkTPin(g, 0.0f, 1.0f) * 255), in As()
77 SkScalarRoundToInt(SkTPin(b, 0.0f, 1.0f) * 255)); in As()
/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/flutter/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()

1234567