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

Unified Diff: gm/imagefilters.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/hairmodes.cpp ('k') | gm/imagefiltersgraph.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/imagefilters.cpp
diff --git a/gm/imagefilters.cpp b/gm/imagefilters.cpp
index e9f54a312d8ea3592112abba37a2f86bbb0f9f5f..27422b561116ea0e2661586665509858b75d3cc0 100644
--- a/gm/imagefilters.cpp
+++ b/gm/imagefilters.cpp
@@ -19,7 +19,7 @@
*
* see https://bug.skia.org/3741
*/
-static void do_draw(SkCanvas* canvas, SkXfermode::Mode mode, sk_sp<SkImageFilter> imf) {
+static void do_draw(SkCanvas* canvas, SkBlendMode mode, sk_sp<SkImageFilter> imf) {
SkAutoCanvasRestore acr(canvas, true);
canvas->clipRect(SkRect::MakeWH(220, 220));
@@ -40,7 +40,7 @@ static void do_draw(SkCanvas* canvas, SkXfermode::Mode mode, sk_sp<SkImageFilter
paint.setColor(0x660000FF);
paint.setImageFilter(std::move(imf));
- paint.setXfermodeMode(mode);
+ paint.setBlendMode(mode);
canvas->drawOval(r1, paint);
}
@@ -52,8 +52,8 @@ DEF_SIMPLE_GM(imagefilters_xfermodes, canvas, 480, 480) {
kNone_SkFilterQuality,
nullptr));
- const SkXfermode::Mode modes[] = {
- SkXfermode::kSrcATop_Mode, SkXfermode::kDstIn_Mode
+ const SkBlendMode modes[] = {
+ SkBlendMode::kSrcATop, SkBlendMode::kDstIn
};
for (size_t i = 0; i < SK_ARRAY_COUNT(modes); ++i) {
« no previous file with comments | « gm/hairmodes.cpp ('k') | gm/imagefiltersgraph.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698