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

Unified Diff: samplecode/SampleLayers.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/SampleLayerMask.cpp ('k') | samplecode/SamplePathClip.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleLayers.cpp
diff --git a/samplecode/SampleLayers.cpp b/samplecode/SampleLayers.cpp
index 52e6593a85f1e0f1975dbee6cab6affc01c343f2..71b2e8ba66c292483428adc6e22f2e88978ca447 100644
--- a/samplecode/SampleLayers.cpp
+++ b/samplecode/SampleLayers.cpp
@@ -31,7 +31,7 @@ static void make_paint(SkPaint* paint, const SkMatrix& localMatrix) {
SkPoint pts[] = { { 0, 0 }, { 0, SK_Scalar1*20 } };
paint->setShader(SkGradientShader::MakeLinear(pts, colors, nullptr, 2,
SkShader::kClamp_TileMode, 0, &localMatrix));
- paint->setXfermodeMode(SkXfermode::kDstIn_Mode);
+ paint->setBlendMode(SkBlendMode::kDstIn);
}
// test drawing with strips of fading gradient above and below
@@ -141,7 +141,7 @@ protected:
canvas->saveLayer(&r, &p);
canvas->drawColor(0xFFFF0000);
p.setAlpha(0); // or 0
- p.setXfermodeMode(SkXfermode::kSrc_Mode);
+ p.setBlendMode(SkBlendMode::kSrc);
canvas->drawOval(r, p);
canvas->restore();
return;
« no previous file with comments | « samplecode/SampleLayerMask.cpp ('k') | samplecode/SamplePathClip.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698