Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(579)

Unified Diff: gm/gradients.cpp

Issue 1114243005: remove (redundant) twopointradial shader (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gm/blurroundrect.cpp ('k') | gm/gradients_no_texture.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/gradients.cpp
diff --git a/gm/gradients.cpp b/gm/gradients.cpp
index 7ff9d380d1e77ca627f34a8313102d71af1ceccb..eb1409d625720cf230abf07c3846a4d9f9b403bb 100644
--- a/gm/gradients.cpp
+++ b/gm/gradients.cpp
@@ -70,11 +70,11 @@ static SkShader* Make2Radial(const SkPoint pts[2], const GradData& data,
SkScalarAve(pts[0].fY, pts[1].fY));
center1.set(SkScalarInterp(pts[0].fX, pts[1].fX, SkIntToScalar(3)/5),
SkScalarInterp(pts[0].fY, pts[1].fY, SkIntToScalar(1)/4));
- return SkGradientShader::CreateTwoPointRadial(
- center1, (pts[1].fX - pts[0].fX) / 7,
- center0, (pts[1].fX - pts[0].fX) / 2,
- data.fColors, data.fPos, data.fCount, tm,
- 0, &localMatrix);
+ return SkGradientShader::CreateTwoPointConical(
+ center1, (pts[1].fX - pts[0].fX) / 7,
+ center0, (pts[1].fX - pts[0].fX) / 2,
+ data.fColors, data.fPos, data.fCount, tm,
+ 0, &localMatrix);
}
static SkShader* Make2Conical(const SkPoint pts[2], const GradData& data,
@@ -273,9 +273,9 @@ protected:
SkPoint c1;
c1.iset(0, 25);
SkScalar r1 = SkIntToScalar(150);
- SkShader* s = SkGradientShader::CreateTwoPointRadial(c0, r0, c1, r1, colors,
- pos, SK_ARRAY_COUNT(pos),
- SkShader::kClamp_TileMode);
+ SkShader* s = SkGradientShader::CreateTwoPointConical(c0, r0, c1, r1, colors,
+ pos, SK_ARRAY_COUNT(pos),
+ SkShader::kClamp_TileMode);
SkPaint paint;
paint.setShader(s)->unref();
canvas->drawPaint(paint);
« no previous file with comments | « gm/blurroundrect.cpp ('k') | gm/gradients_no_texture.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698