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

Unified Diff: gm/texturedomaineffect.cpp

Issue 1793303002: Reland of "more shader-->sp conversions (patchset #5 id:80001 of https://codereview.chromium… (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: make pictureRef a value, so its clearer what's going on Created 4 years, 9 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/textblobshader.cpp ('k') | gm/tiledscaledbitmap.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/texturedomaineffect.cpp
diff --git a/gm/texturedomaineffect.cpp b/gm/texturedomaineffect.cpp
index 72e40feb49396221fc29788b7d94ec16f8459a18..6bd6490c660ba7064bff0a873b632474210832b0 100644
--- a/gm/texturedomaineffect.cpp
+++ b/gm/texturedomaineffect.cpp
@@ -50,24 +50,24 @@ protected:
SkPaint paint;
SkColor colors1[] = { SK_ColorCYAN, SK_ColorLTGRAY, SK_ColorGRAY };
- paint.setShader(SkGradientShader::CreateSweep(65.f, 75.f, colors1,
- nullptr, SK_ARRAY_COUNT(colors1)))->unref();
- canvas.drawOval(SkRect::MakeXYWH(-5.f, -5.f,
- fBmp.width() + 10.f, fBmp.height() + 10.f), paint);
+ paint.setShader(SkGradientShader::MakeSweep(65.f, 75.f, colors1, nullptr,
+ SK_ARRAY_COUNT(colors1)));
+ canvas.drawOval(SkRect::MakeXYWH(-5.f, -5.f, fBmp.width() + 10.f, fBmp.height() + 10.f),
+ paint);
SkColor colors2[] = { SK_ColorMAGENTA, SK_ColorLTGRAY, SK_ColorYELLOW };
- paint.setShader(SkGradientShader::CreateSweep(45.f, 55.f, colors2, nullptr,
- SK_ARRAY_COUNT(colors2)))->unref();
+ paint.setShader(SkGradientShader::MakeSweep(45.f, 55.f, colors2, nullptr,
+ SK_ARRAY_COUNT(colors2)));
paint.setXfermodeMode(SkXfermode::kDarken_Mode);
- canvas.drawOval(SkRect::MakeXYWH(-5.f, -5.f,
- fBmp.width() + 10.f, fBmp.height() + 10.f), paint);
+ canvas.drawOval(SkRect::MakeXYWH(-5.f, -5.f, fBmp.width() + 10.f, fBmp.height() + 10.f),
+ paint);
SkColor colors3[] = { SK_ColorBLUE, SK_ColorLTGRAY, SK_ColorGREEN };
- paint.setShader(SkGradientShader::CreateSweep(25.f, 35.f, colors3, nullptr,
- SK_ARRAY_COUNT(colors3)))->unref();
+ paint.setShader(SkGradientShader::MakeSweep(25.f, 35.f, colors3, nullptr,
+ SK_ARRAY_COUNT(colors3)));
paint.setXfermodeMode(SkXfermode::kLighten_Mode);
- canvas.drawOval(SkRect::MakeXYWH(-5.f, -5.f,
- fBmp.width() + 10.f, fBmp.height() + 10.f), paint);
+ canvas.drawOval(SkRect::MakeXYWH(-5.f, -5.f, fBmp.width() + 10.f, fBmp.height() + 10.f),
+ paint);
}
void onDraw(SkCanvas* canvas) override {
« no previous file with comments | « gm/textblobshader.cpp ('k') | gm/tiledscaledbitmap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698