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

Unified Diff: gm/colortypexfermode.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/colortypexfermode.cpp
diff --git a/gm/colortypexfermode.cpp b/gm/colortypexfermode.cpp
index 3489f3655789f94c8284322a84a7bc12da4efa2c..36db2aa3f5f861bbc6b0216540357248ca6022f4 100644
--- a/gm/colortypexfermode.cpp
+++ b/gm/colortypexfermode.cpp
@@ -121,8 +121,6 @@ protected:
SkScalar y0 = 0;
SkScalar x = x0, y = y0;
for (size_t i = 0; i < SK_ARRAY_COUNT(gModes); i++) {
- SkXfermode* mode = SkXfermode::Create(gModes[i].fMode);
- SkAutoUnref aur(mode);
SkRect r;
r.set(x, y, x+w, y+h);
@@ -136,7 +134,7 @@ protected:
p.setShader(nullptr);
canvas->drawRect(r, p);
- textP.setXfermode(mode);
+ textP.setXfermode(SkXfermode::Make(gModes[i].fMode));
canvas->drawText("H", 1, x+ w/10.f, y + 7.f*h/8.f, textP);
#if 1
canvas->drawText(gModes[i].fLabel, strlen(gModes[i].fLabel),

Powered by Google App Engine
This is Rietveld 408576698