Home
last modified time | relevance | path

Searched refs:radii (Results 1 – 25 of 156) sorted by relevance

1234567

/third_party/flutter/skia/src/gpu/effects/generated/
DGrEllipseEffect.cpp30 auto radii = _outer.radii; in emitCode() local
31 (void)radii; in emitCode()
71 auto radii = _outer.radii; in onSetData() local
72 (void)radii; in onSetData()
78 if (radii != prevRadii || center != prevCenter) { in onSetData()
85 if (radii.fX > radii.fY) { in onSetData()
87 invRYSqd = (radii.fX * radii.fX) / (radii.fY * radii.fY); in onSetData()
88 pdman.set2f(scale, radii.fX, 1.f / radii.fX); in onSetData()
90 invRXSqd = (radii.fY * radii.fY) / (radii.fX * radii.fX); in onSetData()
92 pdman.set2f(scale, radii.fY, 1.f / radii.fY); in onSetData()
[all …]
DGrEllipseEffect.h22 SkPoint radii, const GrShaderCaps& caps) { in Make() argument
24 if (!caps.floatIs32Bits() && (radii.fX < 0.5f || radii.fY < 0.5f)) { in Make()
28 if (!caps.floatIs32Bits() && (radii.fX > 255 * radii.fY || radii.fY > 255 * radii.fX)) { in Make()
32 if (!caps.floatIs32Bits() && (radii.fX > 16384 || radii.fY > 16384)) { in Make()
35 return std::unique_ptr<GrFragmentProcessor>(new GrEllipseEffect(edgeType, center, radii)); in Make()
42 SkPoint radii; variable
45 GrEllipseEffect(GrClipEdgeType edgeType, SkPoint center, SkPoint radii) in GrEllipseEffect() argument
50 , radii(radii) {} in GrEllipseEffect()
/third_party/skia/gm/
Drrect.cpp32 SkVector radii[4]; in inset0() local
34 radii[i] = src.radii((SkRRect::Corner)i); in inset0()
37 radii[i].fX -= dx; in inset0()
38 radii[i].fY -= dy; in inset0()
40 dst->setRectRadii(r, radii); in inset0()
52 SkVector radii[4]; in inset1() local
54 radii[i] = src.radii((SkRRect::Corner)i); in inset1()
56 dst->setRectRadii(r, radii); in inset1()
68 SkVector radii[4]; in inset2() local
70 radii[i] = src.radii((SkRRect::Corner)i); in inset2()
[all …]
/third_party/flutter/skia/gm/
Drrect.cpp32 SkVector radii[4]; in inset0() local
34 radii[i] = src.radii((SkRRect::Corner)i); in inset0()
37 radii[i].fX -= dx; in inset0()
38 radii[i].fY -= dy; in inset0()
40 dst->setRectRadii(r, radii); in inset0()
52 SkVector radii[4]; in inset1() local
54 radii[i] = src.radii((SkRRect::Corner)i); in inset1()
56 dst->setRectRadii(r, radii); in inset1()
68 SkVector radii[4]; in inset2() local
70 radii[i] = src.radii((SkRRect::Corner)i); in inset2()
[all …]
/third_party/flutter/skia/src/gpu/effects/
DGrEllipseEffect.fp14 in float2 radii;
27 SkPoint radii, const GrShaderCaps& caps) {
28 // Small radii produce bad results on devices without full float.
29 if (!caps.floatIs32Bits() && (radii.fX < 0.5f || radii.fY < 0.5f)) {
33 if (!caps.floatIs32Bits() && (radii.fX > 255*radii.fY || radii.fY > 255*radii.fX)) {
37 if (!caps.floatIs32Bits() && (radii.fX > 16384 || radii.fY > 16384)) {
40 return std::unique_ptr<GrFragmentProcessor>(new GrEllipseEffect(edgeType, center, radii));
47 if (radii != prevRadii || center != prevCenter) {
51 // radius as the scale factor. The inv radii need to be pre-adjusted by the scale
54 if (radii.fX > radii.fY) {
[all …]
DGrRRectEffect.cpp307 radius = rrect.radii(SkRRect::kUpperLeft_Corner).fX; in onSetData()
314 radius = rrect.radii(SkRRect::kUpperRight_Corner).fX; in onSetData()
321 radius = rrect.radii(SkRRect::kLowerRight_Corner).fX; in onSetData()
328 radius = rrect.radii(SkRRect::kLowerLeft_Corner).fX; in onSetData()
335 radius = rrect.radii(SkRRect::kUpperLeft_Corner).fX; in onSetData()
342 radius = rrect.radii(SkRRect::kUpperLeft_Corner).fX; in onSetData()
349 radius = rrect.radii(SkRRect::kUpperRight_Corner).fX; in onSetData()
356 radius = rrect.radii(SkRRect::kLowerLeft_Corner).fX; in onSetData()
607 const SkVector& r0 = rrect.radii(SkRRect::kUpperLeft_Corner); in onSetData()
627 const SkVector& r1 = rrect.radii(SkRRect::kLowerRight_Corner); in onSetData()
[all …]
/third_party/flutter/skia/docs/examples/
DCanvas_drawRRect.cpp10 SkRect radii = {30, 50, 70, 90 }; in draw() local
12 rRect.setNinePatch(outer, radii.fLeft, radii.fTop, radii.fRight, radii.fBottom); in draw()
15 canvas->drawLine(outer.fLeft + radii.fLeft, outer.fTop, in draw()
16 outer.fLeft + radii.fLeft, outer.fBottom, paint); in draw()
17 canvas->drawLine(outer.fRight - radii.fRight, outer.fTop, in draw()
18 outer.fRight - radii.fRight, outer.fBottom, paint); in draw()
19 canvas->drawLine(outer.fLeft, outer.fTop + radii.fTop, in draw()
20 outer.fRight, outer.fTop + radii.fTop, paint); in draw()
21 canvas->drawLine(outer.fLeft, outer.fBottom - radii.fBottom, in draw()
22 outer.fRight, outer.fBottom - radii.fBottom, paint); in draw()
DRRect_Corner.cpp15 canvas->drawLine(r.fLeft, r.fTop + rrect.radii(SkRRect::kUpperLeft_Corner).fY, in draw()
16 r.fRight, r.fTop + rrect.radii(SkRRect::kUpperRight_Corner).fY, paint); in draw()
17 canvas->drawLine(r.fLeft, r.fBottom - rrect.radii(SkRRect::kLowerLeft_Corner).fY, in draw()
18 r.fRight, r.fBottom - rrect.radii(SkRRect::kLowerRight_Corner).fY, paint); in draw()
19 canvas->drawLine(r.fLeft + rrect.radii(SkRRect::kUpperLeft_Corner).fX, r.fTop, in draw()
20 r.fLeft + rrect.radii(SkRRect::kLowerLeft_Corner).fX, r.fBottom, paint); in draw()
21 canvas->drawLine(r.fRight - rrect.radii(SkRRect::kUpperRight_Corner).fX, r.fTop, in draw()
22 r.fRight - rrect.radii(SkRRect::kLowerRight_Corner).fX, r.fBottom, paint); in draw()
DRRect_setNinePatch.cpp14 canvas->drawLine(r.fLeft, r.fTop + rrect.radii(SkRRect::kUpperLeft_Corner).fY, in draw()
15 r.fRight, r.fTop + rrect.radii(SkRRect::kUpperRight_Corner).fY, paint); in draw()
16 canvas->drawLine(r.fLeft, r.fBottom - rrect.radii(SkRRect::kLowerLeft_Corner).fY, in draw()
17 r.fRight, r.fBottom - rrect.radii(SkRRect::kLowerRight_Corner).fY, paint); in draw()
18 canvas->drawLine(r.fLeft + rrect.radii(SkRRect::kUpperLeft_Corner).fX, r.fTop, in draw()
19 r.fLeft + rrect.radii(SkRRect::kLowerLeft_Corner).fX, r.fBottom, paint); in draw()
20 canvas->drawLine(r.fRight - rrect.radii(SkRRect::kUpperRight_Corner).fX, r.fTop, in draw()
21 r.fRight - rrect.radii(SkRRect::kLowerRight_Corner).fX, r.fBottom, paint); in draw()
DMatrix_mapVectors_2.cpp12 SkVector radii[] = {{7, 7}, {3, 3}, {2, 2}, {4, 0}}; in draw() local
15 rrect.setRectRadii({20, 20, 180, 70}, radii); in draw()
18 matrix.mapVectors(radii, SK_ARRAY_COUNT(radii)); in draw()
/third_party/skia/docs/examples/
DCanvas_drawRRect.cpp10 SkRect radii = {30, 50, 70, 90 }; in draw() local
12 rRect.setNinePatch(outer, radii.fLeft, radii.fTop, radii.fRight, radii.fBottom); in draw()
15 canvas->drawLine(outer.fLeft + radii.fLeft, outer.fTop, in draw()
16 outer.fLeft + radii.fLeft, outer.fBottom, paint); in draw()
17 canvas->drawLine(outer.fRight - radii.fRight, outer.fTop, in draw()
18 outer.fRight - radii.fRight, outer.fBottom, paint); in draw()
19 canvas->drawLine(outer.fLeft, outer.fTop + radii.fTop, in draw()
20 outer.fRight, outer.fTop + radii.fTop, paint); in draw()
21 canvas->drawLine(outer.fLeft, outer.fBottom - radii.fBottom, in draw()
22 outer.fRight, outer.fBottom - radii.fBottom, paint); in draw()
DRRect_setNinePatch.cpp14 canvas->drawLine(r.fLeft, r.fTop + rrect.radii(SkRRect::kUpperLeft_Corner).fY, in draw()
15 r.fRight, r.fTop + rrect.radii(SkRRect::kUpperRight_Corner).fY, paint); in draw()
16 canvas->drawLine(r.fLeft, r.fBottom - rrect.radii(SkRRect::kLowerLeft_Corner).fY, in draw()
17 r.fRight, r.fBottom - rrect.radii(SkRRect::kLowerRight_Corner).fY, paint); in draw()
18 canvas->drawLine(r.fLeft + rrect.radii(SkRRect::kUpperLeft_Corner).fX, r.fTop, in draw()
19 r.fLeft + rrect.radii(SkRRect::kLowerLeft_Corner).fX, r.fBottom, paint); in draw()
20 canvas->drawLine(r.fRight - rrect.radii(SkRRect::kUpperRight_Corner).fX, r.fTop, in draw()
21 r.fRight - rrect.radii(SkRRect::kLowerRight_Corner).fX, r.fBottom, paint); in draw()
DRRect_Corner.cpp15 canvas->drawLine(r.fLeft, r.fTop + rrect.radii(SkRRect::kUpperLeft_Corner).fY, in draw()
16 r.fRight, r.fTop + rrect.radii(SkRRect::kUpperRight_Corner).fY, paint); in draw()
17 canvas->drawLine(r.fLeft, r.fBottom - rrect.radii(SkRRect::kLowerLeft_Corner).fY, in draw()
18 r.fRight, r.fBottom - rrect.radii(SkRRect::kLowerRight_Corner).fY, paint); in draw()
19 canvas->drawLine(r.fLeft + rrect.radii(SkRRect::kUpperLeft_Corner).fX, r.fTop, in draw()
20 r.fLeft + rrect.radii(SkRRect::kLowerLeft_Corner).fX, r.fBottom, paint); in draw()
21 canvas->drawLine(r.fRight - rrect.radii(SkRRect::kUpperRight_Corner).fX, r.fTop, in draw()
22 r.fRight - rrect.radii(SkRRect::kLowerRight_Corner).fX, r.fBottom, paint); in draw()
DMatrix_mapVectors_2.cpp12 SkVector radii[] = {{7, 7}, {3, 3}, {2, 2}, {4, 0}}; in draw() local
15 rrect.setRectRadii({20, 20, 180, 70}, radii); in draw()
18 matrix.mapVectors(radii, SK_ARRAY_COUNT(radii)); in draw()
/third_party/flutter/skia/samplecode/
DSampleClock.cpp46 SkVector radii[4] = {{4,4}, {4,4}, {4,4}, {4,4}}; in onDrawContent() local
47 rrect.setRectRadii(rect, radii); in onDrawContent()
69 radii[0] = SkPoint::Make(2.5f,2.5f); in onDrawContent()
70 radii[1] = SkPoint::Make(2.5f,2.5f); in onDrawContent()
71 radii[2] = SkPoint::Make(2.5f,2.5f); in onDrawContent()
72 radii[3] = SkPoint::Make(2.5f,2.5f); in onDrawContent()
73 rrect.setRectRadii(rect, radii); in onDrawContent()
109 radii[0] = SkPoint::Make(7,7); in onDrawContent()
110 radii[1] = SkPoint::Make(7,7); in onDrawContent()
111 radii[2] = SkPoint::Make(7,7); in onDrawContent()
[all …]
/third_party/skia/samplecode/
DSampleClock.cpp46 SkVector radii[4] = {{4,4}, {4,4}, {4,4}, {4,4}}; in onDrawContent() local
47 rrect.setRectRadii(rect, radii); in onDrawContent()
69 radii[0] = SkPoint::Make(2.5f,2.5f); in onDrawContent()
70 radii[1] = SkPoint::Make(2.5f,2.5f); in onDrawContent()
71 radii[2] = SkPoint::Make(2.5f,2.5f); in onDrawContent()
72 radii[3] = SkPoint::Make(2.5f,2.5f); in onDrawContent()
73 rrect.setRectRadii(rect, radii); in onDrawContent()
109 radii[0] = SkPoint::Make(7,7); in onDrawContent()
110 radii[1] = SkPoint::Make(7,7); in onDrawContent()
111 radii[2] = SkPoint::Make(7,7); in onDrawContent()
[all …]
/third_party/skia/src/core/
DSkRRect.cpp147 static bool clamp_to_zero(SkVector radii[4]) { in clamp_to_zero()
152 if (radii[i].fX <= 0 || radii[i].fY <= 0) { in clamp_to_zero()
157 radii[i].fX = 0; in clamp_to_zero()
158 radii[i].fY = 0; in clamp_to_zero()
167 void SkRRect::setRectRadii(const SkRect& rect, const SkVector radii[4]) { in setRectRadii()
172 if (!SkScalarsAreFinite(&radii[0].fX, 8)) { in setRectRadii()
177 memcpy(fRadii, radii, sizeof(fRadii)); in setRectRadii()
359 static bool radii_are_nine_patch(const SkVector radii[4]) { in radii_are_nine_patch()
360 return radii[SkRRect::kUpperLeft_Corner].fX == radii[SkRRect::kLowerLeft_Corner].fX && in radii_are_nine_patch()
361 radii[SkRRect::kUpperLeft_Corner].fY == radii[SkRRect::kUpperRight_Corner].fY && in radii_are_nine_patch()
[all …]
DSkPathMakers.h77 fPts[0] = SkPoint::Make(L + rrect.radii(SkRRect::kUpperLeft_Corner).fX, T); in SkPath_RRectPointIterator()
78 fPts[1] = SkPoint::Make(R - rrect.radii(SkRRect::kUpperRight_Corner).fX, T); in SkPath_RRectPointIterator()
79 fPts[2] = SkPoint::Make(R, T + rrect.radii(SkRRect::kUpperRight_Corner).fY); in SkPath_RRectPointIterator()
80 fPts[3] = SkPoint::Make(R, B - rrect.radii(SkRRect::kLowerRight_Corner).fY); in SkPath_RRectPointIterator()
81 fPts[4] = SkPoint::Make(R - rrect.radii(SkRRect::kLowerRight_Corner).fX, B); in SkPath_RRectPointIterator()
82 fPts[5] = SkPoint::Make(L + rrect.radii(SkRRect::kLowerLeft_Corner).fX, B); in SkPath_RRectPointIterator()
83 fPts[6] = SkPoint::Make(L, B - rrect.radii(SkRRect::kLowerLeft_Corner).fY); in SkPath_RRectPointIterator()
84 fPts[7] = SkPoint::Make(L, T + rrect.radii(SkRRect::kUpperLeft_Corner).fY); in SkPath_RRectPointIterator()
/third_party/flutter/skia/src/core/
DSkRRect.cpp123 static bool clamp_to_zero(SkVector radii[4]) { in clamp_to_zero()
128 if (radii[i].fX <= 0 || radii[i].fY <= 0) { in clamp_to_zero()
133 radii[i].fX = 0; in clamp_to_zero()
134 radii[i].fY = 0; in clamp_to_zero()
143 void SkRRect::setRectRadii(const SkRect& rect, const SkVector radii[4]) { in setRectRadii()
148 if (!SkScalarsAreFinite(&radii[0].fX, 8)) { in setRectRadii()
153 memcpy(fRadii, radii, sizeof(fRadii)); in setRectRadii()
319 static bool radii_are_nine_patch(const SkVector radii[4]) { in radii_are_nine_patch()
320 return radii[SkRRect::kUpperLeft_Corner].fX == radii[SkRRect::kLowerLeft_Corner].fX && in radii_are_nine_patch()
321 radii[SkRRect::kUpperLeft_Corner].fY == radii[SkRRect::kUpperRight_Corner].fY && in radii_are_nine_patch()
[all …]
/third_party/skia/tests/
DRoundRectTest.cpp29 SkVector radii[4] = { in test_tricky_radii() local
33 rr.setRectRadii(r, radii); in test_tricky_radii()
35 REPORTER_ASSERT(reporter, (double) rr.radii(SkRRect::kUpperRight_Corner).fY + in test_tricky_radii()
36 (double) rr.radii(SkRRect::kLowerRight_Corner).fY <= in test_tricky_radii()
70 static const SkVector radii[4] = { { 0, 1 }, { 2, 3 }, { 4, 5 }, { 6, 7 } }; in test_empty() local
91 r.setRectRadii(oooRects[i], radii); in test_empty()
113 r.setRectRadii(emptyRects[i], radii); in test_empty()
165 REPORTER_ASSERT(reporter, rquad[i] == rr.radii((SkRRect::Corner) i)); in test_9patch_rrect()
169 SkVector radii[4] = { { l, t }, { r, t }, { r, b }, { l, b } }; in test_9patch_rrect() local
170 rr2.setRectRadii(rect, radii); in test_9patch_rrect()
[all …]
DRRectInPathTest.cpp184 SkVector radii[4] = { in test_tricky_radii() local
188 rr.setRectRadii(r, radii); in test_tricky_radii()
254 SkVector radii[4] = { { l, t }, { r, t }, { r, b }, { l, b } }; in test_9patch_rrect() local
255 rr2.setRectRadii(rect, radii); in test_9patch_rrect()
351 SkPoint radii[4] = { { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 } }; in test_round_rect_rects() local
354 rr2.setRectRadii(rect, radii); in test_round_rect_rects()
394 SkPoint radii[4] = { { 0, 0 }, { 20, 20 }, { 50, 50 }, { 20, 50 } }; in test_round_rect_general() local
397 rr2.setRectRadii(rect, radii); in test_round_rect_general()
408 SkPoint radii[4] = { { 50, 100 }, { 100, 50 }, { 50, 100 }, { 100, 50 } }; in test_round_rect_iffy_parameters() local
410 rr1.setRectRadii(rect, radii); in test_round_rect_iffy_parameters()
[all …]
/third_party/flutter/skia/tests/
DRRectInPathTest.cpp188 SkVector radii[4] = { in test_tricky_radii() local
192 rr.setRectRadii(r, radii); in test_tricky_radii()
258 SkVector radii[4] = { { l, t }, { r, t }, { r, b }, { l, b } }; in test_9patch_rrect() local
259 rr2.setRectRadii(rect, radii); in test_9patch_rrect()
355 SkPoint radii[4] = { { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 } }; in test_round_rect_rects() local
358 rr2.setRectRadii(rect, radii); in test_round_rect_rects()
398 SkPoint radii[4] = { { 0, 0 }, { 20, 20 }, { 50, 50 }, { 20, 50 } }; in test_round_rect_general() local
401 rr2.setRectRadii(rect, radii); in test_round_rect_general()
412 SkPoint radii[4] = { { 50, 100 }, { 100, 50 }, { 50, 100 }, { 100, 50 } }; in test_round_rect_iffy_parameters() local
414 rr1.setRectRadii(rect, radii); in test_round_rect_iffy_parameters()
[all …]
DRoundRectTest.cpp26 SkVector radii[4] = { in test_tricky_radii() local
30 rr.setRectRadii(r, radii); in test_tricky_radii()
32 REPORTER_ASSERT(reporter, (double) rr.radii(SkRRect::kUpperRight_Corner).fY + in test_tricky_radii()
33 (double) rr.radii(SkRRect::kLowerRight_Corner).fY <= in test_tricky_radii()
67 static const SkVector radii[4] = { { 0, 1 }, { 2, 3 }, { 4, 5 }, { 6, 7 } }; in test_empty() local
88 r.setRectRadii(oooRects[i], radii); in test_empty()
110 r.setRectRadii(emptyRects[i], radii); in test_empty()
162 REPORTER_ASSERT(reporter, rquad[i] == rr.radii((SkRRect::Corner) i)); in test_9patch_rrect()
166 SkVector radii[4] = { { l, t }, { r, t }, { r, b }, { l, b } }; in test_9patch_rrect() local
167 rr2.setRectRadii(rect, radii); in test_9patch_rrect()
[all …]
/third_party/skia/src/gpu/
DGrFragmentProcessor.cpp698 SkPoint radii, in Ellipse() argument
703 if (medPrecision && (radii.fX < 0.5f || radii.fY < 0.5f)) { in Ellipse()
707 if (medPrecision && (radii.fX > 255*radii.fY || radii.fY > 255*radii.fX)) { in Ellipse()
711 if (medPrecision && (radii.fX > 16384 || radii.fY > 16384)) { in Ellipse()
768 if (radii.fX > radii.fY) { in Ellipse()
770 invRYSqd = (radii.fX * radii.fX) / (radii.fY * radii.fY); in Ellipse()
771 scale = {radii.fX, 1.f / radii.fX}; in Ellipse()
773 invRXSqd = (radii.fY * radii.fY) / (radii.fX * radii.fX); in Ellipse()
775 scale = {radii.fY, 1.f / radii.fY}; in Ellipse()
778 invRXSqd = 1.f / (radii.fX * radii.fX); in Ellipse()
[all …]
/third_party/skia/src/gpu/effects/
DGrRRectEffect.cpp307 radius = rrect.radii(SkRRect::kUpperLeft_Corner).fX; in onSetData()
314 radius = rrect.radii(SkRRect::kUpperRight_Corner).fX; in onSetData()
321 radius = rrect.radii(SkRRect::kLowerRight_Corner).fX; in onSetData()
328 radius = rrect.radii(SkRRect::kLowerLeft_Corner).fX; in onSetData()
335 radius = rrect.radii(SkRRect::kUpperLeft_Corner).fX; in onSetData()
342 radius = rrect.radii(SkRRect::kUpperLeft_Corner).fX; in onSetData()
349 radius = rrect.radii(SkRRect::kUpperRight_Corner).fX; in onSetData()
356 radius = rrect.radii(SkRRect::kLowerLeft_Corner).fX; in onSetData()
613 const SkVector& r0 = rrect.radii(SkRRect::kUpperLeft_Corner); in onSetData()
633 const SkVector& r1 = rrect.radii(SkRRect::kLowerRight_Corner); in onSetData()
[all …]

1234567