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

Unified Diff: tests/RecordOptsTest.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 | « tests/RecordDrawTest.cpp ('k') | tests/RecordingXfermodeTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/RecordOptsTest.cpp
diff --git a/tests/RecordOptsTest.cpp b/tests/RecordOptsTest.cpp
index 4567a01409b7d5bdbfc6c8a6c778496428db3c27..b7c9ae96c69c200e9ee2fbed50212352b8a9486a 100644
--- a/tests/RecordOptsTest.cpp
+++ b/tests/RecordOptsTest.cpp
@@ -140,7 +140,7 @@ DEF_TEST(RecordOpts_NoopSaveLayerDrawRestore, r) {
SkPaint alphaOnlyLayerPaint, translucentLayerPaint, xfermodeLayerPaint;
alphaOnlyLayerPaint.setColor(0x03000000); // Only alpha.
translucentLayerPaint.setColor(0x03040506); // Not only alpha.
- xfermodeLayerPaint.setXfermodeMode(SkXfermode::kDstIn_Mode); // Any effect will do.
+ xfermodeLayerPaint.setBlendMode(SkBlendMode::kDstIn); // Any effect will do.
SkPaint opaqueDrawPaint, translucentDrawPaint;
opaqueDrawPaint.setColor(0xFF020202); // Opaque.
@@ -222,10 +222,10 @@ DEF_TEST(RecordOpts_MergeSvgOpacityAndFilterLayers, r) {
SkPaint translucentLayerPaint;
translucentLayerPaint.setColor(0x03040506); // Not only alpha.
SkPaint xfermodePaint;
- xfermodePaint.setXfermodeMode(SkXfermode::kDstIn_Mode);
+ xfermodePaint.setBlendMode(SkBlendMode::kDstIn);
SkPaint colorFilterPaint;
colorFilterPaint.setColorFilter(
- SkColorFilter::MakeModeFilter(SK_ColorLTGRAY, SkXfermode::kSrcIn_Mode));
+ SkColorFilter::MakeModeFilter(SK_ColorLTGRAY, SkBlendMode::kSrcIn));
SkPaint opaqueFilterLayerPaint;
opaqueFilterLayerPaint.setColor(0xFF020202); // Opaque.
@@ -353,7 +353,7 @@ static void do_draw(SkCanvas* canvas, SkColor color, bool doLayer) {
if (doLayer) {
canvas->saveLayer(nullptr, nullptr);
- p.setXfermodeMode(SkXfermode::kSrc_Mode);
+ p.setBlendMode(SkBlendMode::kSrc);
canvas->drawPaint(p);
canvas->restore();
} else {
« no previous file with comments | « tests/RecordDrawTest.cpp ('k') | tests/RecordingXfermodeTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698