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

Unified Diff: gm/bitmaprect.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/bitmaprect.cpp
diff --git a/gm/bitmaprect.cpp b/gm/bitmaprect.cpp
index 4853d03a52d05cd9e3e51b028fb5230264683614..4db6e2fe95494650a9b403d088b1468f20cd9ff7 100644
--- a/gm/bitmaprect.cpp
+++ b/gm/bitmaprect.cpp
@@ -199,12 +199,9 @@ protected:
}
void onDraw(SkCanvas* canvas) override {
-
- SkXfermode* mode = SkXfermode::Create(SkXfermode::kXor_Mode);
-
SkPaint paint;
paint.setAlpha(128);
- paint.setXfermode(mode)->unref();
+ paint.setXfermode(SkXfermode::Make(SkXfermode::kXor_Mode));
SkRect srcR1 = { 0.0f, 0.0f, 4096.0f, 2040.0f };
SkRect dstR1 = { 10.1f, 10.1f, 629.9f, 400.9f };

Powered by Google App Engine
This is Rietveld 408576698