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

Unified Diff: gm/xfermodes2.cpp

Issue 2396953002: Revert[8] "replace SkXfermode obj with SkBlendMode enum in paints" (Closed)
Patch Set: add tmp virtual to unroll legacy arithmodes Created 4 years, 2 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/xfermodes.cpp ('k') | gm/xfermodes3.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/xfermodes2.cpp
diff --git a/gm/xfermodes2.cpp b/gm/xfermodes2.cpp
index 6f7d05475cca76fcd3a7319effaa3fa8cfd9a8bc..03da0d33173058366f1d3da1488691c6816342ba 100644
--- a/gm/xfermodes2.cpp
+++ b/gm/xfermodes2.cpp
@@ -40,7 +40,7 @@ protected:
SkScalar x = 0, y = 0;
for (size_t m = 0; m <= SkXfermode::kLastMode; m++) {
- SkXfermode::Mode mode = static_cast<SkXfermode::Mode>(m);
+ SkBlendMode mode = static_cast<SkBlendMode>(m);
canvas->save();
@@ -57,7 +57,7 @@ protected:
p.setShader(fDst);
canvas->drawRect(r, p);
p.setShader(fSrc);
- p.setXfermode(SkXfermode::Make(mode));
+ p.setBlendMode(mode);
canvas->drawRect(r, p);
canvas->restore();
@@ -65,7 +65,7 @@ protected:
r.inset(-SK_ScalarHalf, -SK_ScalarHalf);
p.setStyle(SkPaint::kStroke_Style);
p.setShader(nullptr);
- p.setXfermode(nullptr);
+ p.setBlendMode(SkBlendMode::kSrcOver);
canvas->drawRect(r, p);
canvas->restore();
« no previous file with comments | « gm/xfermodes.cpp ('k') | gm/xfermodes3.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698