Revert[8] "replace SkXfermode obj with SkBlendMode enum in paints"
This reverts commit c245574ba3d0e2ade6c94b2812de3baa383bf4c4.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2396953002
TBR=
Review-Url: https://codereview.chromium.org/2396953002
diff --git a/gm/lumafilter.cpp b/gm/lumafilter.cpp
index 10eefab..3852d93 100644
--- a/gm/lumafilter.cpp
+++ b/gm/lumafilter.cpp
@@ -26,7 +26,7 @@
paint);
}
-static void draw_scene(SkCanvas* canvas, const sk_sp<SkColorFilter>& filter, SkXfermode::Mode mode,
+static void draw_scene(SkCanvas* canvas, const sk_sp<SkColorFilter>& filter, SkBlendMode mode,
const sk_sp<SkShader>& s1, const sk_sp<SkShader>& s2) {
SkPaint paint;
paint.setAntiAlias(true);
@@ -53,7 +53,7 @@
}
SkPaint xferPaint;
- xferPaint.setXfermodeMode(mode);
+ xferPaint.setBlendMode(mode);
canvas->saveLayer(&bounds, &xferPaint);
r = bounds;
@@ -101,13 +101,14 @@
}
void onDraw(SkCanvas* canvas) override {
- SkXfermode::Mode modes[] = { SkXfermode::kSrcOver_Mode,
- SkXfermode::kDstOver_Mode,
- SkXfermode::kSrcATop_Mode,
- SkXfermode::kDstATop_Mode,
- SkXfermode::kSrcIn_Mode,
- SkXfermode::kDstIn_Mode,
- };
+ SkBlendMode modes[] = {
+ SkBlendMode::kSrcOver,
+ SkBlendMode::kDstOver,
+ SkBlendMode::kSrcATop,
+ SkBlendMode::kDstATop,
+ SkBlendMode::kSrcIn,
+ SkBlendMode::kDstIn,
+ };
struct {
const sk_sp<SkShader>& fShader1;
const sk_sp<SkShader>& fShader2;