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

Unified Diff: gm/pixelxorxfermode.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/pixelxorxfermode.cpp
diff --git a/gm/pixelxorxfermode.cpp b/gm/pixelxorxfermode.cpp
index daccca8c413d23a7224300767229eb9d9df3f480..6a490e1767883267a42e886f8f9bf0a0496e5136 100644
--- a/gm/pixelxorxfermode.cpp
+++ b/gm/pixelxorxfermode.cpp
@@ -38,7 +38,7 @@ protected:
// the green & blue channels alone
SkPaint p1;
p1.setColor(SK_ColorBLACK); // noop
- p1.setXfermode(SkPixelXorXfermode::Create(0x7FFF0000))->unref();
+ p1.setXfermode(SkPixelXorXfermode::Make(0x7FFF0000));
canvas->drawRect(r, p1);
@@ -47,7 +47,7 @@ protected:
// Negate the dst color via the src color
SkPaint p2;
p2.setColor(SK_ColorWHITE);
- p2.setXfermode(SkPixelXorXfermode::Create(SK_ColorBLACK))->unref(); // noop
+ p2.setXfermode(SkPixelXorXfermode::Make(SK_ColorBLACK)); // noop
canvas->drawRect(r, p2);
@@ -56,7 +56,7 @@ protected:
// Just return the original color
SkPaint p3;
p3.setColor(SK_ColorBLACK); // noop
- p3.setXfermode(SkPixelXorXfermode::Create(SK_ColorBLACK))->unref(); // noop
+ p3.setXfermode(SkPixelXorXfermode::Make(SK_ColorBLACK)); // noop
canvas->drawRect(r, p3);
@@ -66,7 +66,7 @@ protected:
// the blue channel alone
SkPaint p4;
p4.setColor(SK_ColorBLACK); // noop
- p4.setXfermode(SkPixelXorXfermode::Create(SK_ColorYELLOW))->unref();
+ p4.setXfermode(SkPixelXorXfermode::Make(SK_ColorYELLOW));
canvas->drawRect(r, p4);
}
« no previous file with comments | « gm/patch.cpp ('k') | gm/vertices.cpp » ('j') | include/effects/SkXfermodeImageFilter.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698