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

Unified Diff: tests/RecordOptsTest.cpp

Issue 840483005: Fold alpha to the draw in savelayer-draw-restore patterns with non-opaque draw (Closed) Base URL: https://skia.googlesource.com/skia.git@unique-id-unflatten
Patch Set: Created 5 years, 11 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
« src/core/SkRecordOpts.cpp ('K') | « src/core/SkRecordOpts.cpp ('k') | no next file » | 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 dd5035b216b66e52f156d4e117f0b9943f8913bc..34725e18a691f251f8d32f703e14ceae1c99742d 100644
--- a/tests/RecordOptsTest.cpp
+++ b/tests/RecordOptsTest.cpp
@@ -155,11 +155,11 @@ DEF_TEST(RecordOpts_NoopSaveLayerDrawRestore, r) {
recorder.restore();
assert_savelayer_restore(r, &record, 9, false);
- // No change: draw paint isn't opaque.
+ // SaveLayer/Restore removed: we can fold in the alpha!
recorder.saveLayer(NULL, &goodLayerPaint);
recorder.drawRect(draw, badDrawPaint);
recorder.restore();
- assert_savelayer_restore(r, &record, 12, false);
+ assert_savelayer_restore(r, &record, 12, true);
// SaveLayer/Restore removed: we can fold in the alpha!
recorder.saveLayer(NULL, &goodLayerPaint);
« src/core/SkRecordOpts.cpp ('K') | « src/core/SkRecordOpts.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698