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

Unified Diff: gm/xfermodes3.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/xfermodes2.cpp ('k') | gyp/skia_for_android_framework_defines.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/xfermodes3.cpp
diff --git a/gm/xfermodes3.cpp b/gm/xfermodes3.cpp
index 300b78f2a28544bab9c3d3a861d8cedc7ef3c6f6..36702bf70e996e1aa2ede5a4ad27fa8093b88064 100644
--- a/gm/xfermodes3.cpp
+++ b/gm/xfermodes3.cpp
@@ -69,7 +69,7 @@ protected:
};
for (size_t s = 0; s < SK_ARRAY_COUNT(kStrokes); ++s) {
for (size_t m = 0; m <= SkXfermode::kLastMode; ++m) {
- SkXfermode::Mode mode = static_cast<SkXfermode::Mode>(m);
+ SkBlendMode mode = static_cast<SkBlendMode>(m);
canvas->drawText(SkXfermode::ModeName(mode),
strlen(SkXfermode::ModeName(mode)),
SkIntToScalar(x),
@@ -77,7 +77,7 @@ protected:
labelP);
for (size_t c = 0; c < SK_ARRAY_COUNT(kSolidColors); ++c) {
SkPaint modePaint;
- modePaint.setXfermodeMode(mode);
+ modePaint.setBlendMode(mode);
modePaint.setColor(kSolidColors[c]);
modePaint.setStyle(kStrokes[s].fStyle);
modePaint.setStrokeWidth(kStrokes[s].fWidth);
@@ -93,7 +93,7 @@ protected:
}
for (size_t a = 0; a < SK_ARRAY_COUNT(kBmpAlphas); ++a) {
SkPaint modePaint;
- modePaint.setXfermodeMode(mode);
+ modePaint.setBlendMode(mode);
modePaint.setAlpha(kBmpAlphas[a]);
modePaint.setShader(fBmpShader);
modePaint.setStyle(kStrokes[s].fStyle);
« no previous file with comments | « gm/xfermodes2.cpp ('k') | gyp/skia_for_android_framework_defines.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698