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

Unified Diff: gm/xfermodes2.cpp

Issue 1832223002: switch xfermodes over to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase 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
Index: gm/xfermodes2.cpp
diff --git a/gm/xfermodes2.cpp b/gm/xfermodes2.cpp
index 0956af66df453826be1bc63dd95f5cd08543d1ad..b0d6ca3def83b8e2e1484cf40081aa00ef7346b1 100644
--- a/gm/xfermodes2.cpp
+++ b/gm/xfermodes2.cpp
@@ -41,8 +41,6 @@ protected:
SkScalar x = 0, y = 0;
for (size_t m = 0; m <= SkXfermode::kLastMode; m++) {
SkXfermode::Mode mode = static_cast<SkXfermode::Mode>(m);
- SkXfermode* xm = SkXfermode::Create(mode);
- SkAutoUnref aur(xm);
canvas->save();
@@ -59,7 +57,7 @@ protected:
p.setShader(fDst);
canvas->drawRect(r, p);
p.setShader(fSrc);
- p.setXfermode(xm);
+ p.setXfermode(SkXfermode::Make(mode));
canvas->drawRect(r, p);
canvas->restore();

Powered by Google App Engine
This is Rietveld 408576698