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

Unified Diff: samplecode/SampleSlides.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 | « samplecode/SampleRegion.cpp ('k') | samplecode/SampleXfer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleSlides.cpp
diff --git a/samplecode/SampleSlides.cpp b/samplecode/SampleSlides.cpp
index 5858d2674e87a989166a5613f594ed677fbf4c88..521e9f6ead1c9c400b3b13865c0cc07e4b7c9306 100644
--- a/samplecode/SampleSlides.cpp
+++ b/samplecode/SampleSlides.cpp
@@ -472,7 +472,7 @@ static void r0(SkLayerRasterizer::Builder* rastBuilder, SkPaint& p)
p.setAlpha(0x11);
p.setStyle(SkPaint::kFill_Style);
- p.setXfermodeMode(SkXfermode::kSrc_Mode);
+ p.setBlendMode(SkBlendMode::kSrc);
rastBuilder->addLayer(p);
}
@@ -481,7 +481,7 @@ static void r1(SkLayerRasterizer::Builder* rastBuilder, SkPaint& p)
rastBuilder->addLayer(p);
p.setAlpha(0x40);
- p.setXfermodeMode(SkXfermode::kSrc_Mode);
+ p.setBlendMode(SkBlendMode::kSrc);
p.setStyle(SkPaint::kStroke_Style);
p.setStrokeWidth(SK_Scalar1*2);
rastBuilder->addLayer(p);
@@ -495,7 +495,7 @@ static void r2(SkLayerRasterizer::Builder* rastBuilder, SkPaint& p)
p.setStyle(SkPaint::kStroke_Style);
p.setStrokeWidth(SK_Scalar1*3/2);
- p.setXfermodeMode(SkXfermode::kClear_Mode);
+ p.setBlendMode(SkBlendMode::kClear);
rastBuilder->addLayer(p);
}
@@ -507,7 +507,7 @@ static void r3(SkLayerRasterizer::Builder* rastBuilder, SkPaint& p)
p.setAlpha(0x20);
p.setStyle(SkPaint::kFill_Style);
- p.setXfermodeMode(SkXfermode::kSrc_Mode);
+ p.setBlendMode(SkBlendMode::kSrc);
rastBuilder->addLayer(p);
}
@@ -517,10 +517,10 @@ static void r4(SkLayerRasterizer::Builder* rastBuilder, SkPaint& p)
rastBuilder->addLayer(p, SkIntToScalar(3), SkIntToScalar(3));
p.setAlpha(0xFF);
- p.setXfermodeMode(SkXfermode::kClear_Mode);
+ p.setBlendMode(SkBlendMode::kClear);
rastBuilder->addLayer(p, SK_Scalar1*3/2, SK_Scalar1*3/2);
- p.setXfermode(nullptr);
+ p.setBlendMode(SkBlendMode::kSrcOver);
rastBuilder->addLayer(p);
}
@@ -531,7 +531,7 @@ static void r5(SkLayerRasterizer::Builder* rastBuilder, SkPaint& p)
rastBuilder->addLayer(p);
p.setPathEffect(SkDiscretePathEffect::Make(SK_Scalar1*4, SK_Scalar1*3));
- p.setXfermodeMode(SkXfermode::kSrcOut_Mode);
+ p.setBlendMode(SkBlendMode::kSrcOut);
rastBuilder->addLayer(p);
}
@@ -543,7 +543,7 @@ static void r6(SkLayerRasterizer::Builder* rastBuilder, SkPaint& p)
SkLayerRasterizer::Builder rastBuilder2;
r5(&rastBuilder2, p);
p.setRasterizer(rastBuilder2.detach());
- p.setXfermodeMode(SkXfermode::kClear_Mode);
+ p.setBlendMode(SkBlendMode::kClear);
rastBuilder->addLayer(p);
}
@@ -572,11 +572,11 @@ static void r8(SkLayerRasterizer::Builder* rastBuilder, SkPaint& p)
lattice.setScale(SK_Scalar1*6, SK_Scalar1*6, 0, 0);
lattice.postSkew(SK_Scalar1/3, 0, 0, 0);
p.setPathEffect(MakeDotEffect(SK_Scalar1*2, lattice));
- p.setXfermodeMode(SkXfermode::kClear_Mode);
+ p.setBlendMode(SkBlendMode::kClear);
rastBuilder->addLayer(p);
p.setPathEffect(nullptr);
- p.setXfermode(nullptr);
+ p.setBlendMode(SkBlendMode::kSrcOver);
p.setStyle(SkPaint::kStroke_Style);
p.setStrokeWidth(SK_Scalar1);
rastBuilder->addLayer(p);
@@ -590,11 +590,11 @@ static void r9(SkLayerRasterizer::Builder* rastBuilder, SkPaint& p)
lattice.setScale(SK_Scalar1, SK_Scalar1*6, 0, 0);
lattice.postRotate(SkIntToScalar(30), 0, 0);
p.setPathEffect(SkLine2DPathEffect::Make(SK_Scalar1*2, lattice));
- p.setXfermodeMode(SkXfermode::kClear_Mode);
+ p.setBlendMode(SkBlendMode::kClear);
rastBuilder->addLayer(p);
p.setPathEffect(nullptr);
- p.setXfermode(nullptr);
+ p.setBlendMode(SkBlendMode::kSrcOver);
p.setStyle(SkPaint::kStroke_Style);
p.setStrokeWidth(SK_Scalar1);
rastBuilder->addLayer(p);
« no previous file with comments | « samplecode/SampleRegion.cpp ('k') | samplecode/SampleXfer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698