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

Unified Diff: tests/RecordOptsTest.cpp

Issue 849243002: Why are we afraid of saveLayer() bounds? (Closed) Base URL: https://skia.googlesource.com/skia.git@master
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
« no previous file with comments | « 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..eaeb737af3cee4c979b29f9313455080da72e298 100644
--- a/tests/RecordOptsTest.cpp
+++ b/tests/RecordOptsTest.cpp
@@ -127,16 +127,14 @@ DEF_TEST(RecordOpts_NoopSaveLayerDrawRestore, r) {
goodDrawPaint.setColor(0xFF020202); // Opaque.
badDrawPaint.setColor( 0x0F020202); // Not opaque.
- // No change: optimization can't handle bounds.
- recorder.saveLayer(&bounds, NULL);
+ // SaveLayer/Restore removed: No paint = no point.
+ recorder.saveLayer(NULL, NULL);
recorder.drawRect(draw, goodDrawPaint);
recorder.restore();
- if (!SkCanvas::Internal_Private_GetIgnoreSaveLayerBounds()) {
- assert_savelayer_restore(r, &record, 0, false);
- }
+ assert_savelayer_restore(r, &record, 0, true);
- // SaveLayer/Restore removed: no bounds + no paint = no point.
- recorder.saveLayer(NULL, NULL);
+ // Bounds don't matter.
+ recorder.saveLayer(&bounds, NULL);
recorder.drawRect(draw, goodDrawPaint);
recorder.restore();
assert_savelayer_restore(r, &record, 3, true);
« no previous file with comments | « src/core/SkRecordOpts.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698