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

Unified Diff: tests/RecordDrawTest.cpp

Issue 819123003: add testing flag to ignore saveLayer bounds (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years 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/PictureTest.cpp ('k') | tests/RecordOptsTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/RecordDrawTest.cpp
diff --git a/tests/RecordDrawTest.cpp b/tests/RecordDrawTest.cpp
index e830af4b430e6582658ffcd6f0db2fdd7042bb05..d306cad6e9fd936efb1084a4b27b345f26f41fcf 100644
--- a/tests/RecordDrawTest.cpp
+++ b/tests/RecordDrawTest.cpp
@@ -275,9 +275,11 @@ DEF_TEST(RecordDraw_SaveLayerBoundsAffectsClipBounds, r) {
TestBBH bbh;
SkRecordFillBounds(SkRect::MakeWH(50, 50), record, &bbh);
REPORTER_ASSERT(r, bbh.fEntries.count() == 3);
- REPORTER_ASSERT(r, sloppy_rect_eq(bbh.fEntries[0].bounds, SkRect::MakeLTRB(10, 10, 40, 40)));
- REPORTER_ASSERT(r, sloppy_rect_eq(bbh.fEntries[1].bounds, SkRect::MakeLTRB(20, 20, 30, 30)));
- REPORTER_ASSERT(r, sloppy_rect_eq(bbh.fEntries[2].bounds, SkRect::MakeLTRB(10, 10, 40, 40)));
+ if (!SkCanvas::Internal_Private_GetIgnoreSaveLayerBounds()) {
+ REPORTER_ASSERT(r, sloppy_rect_eq(bbh.fEntries[0].bounds, SkRect::MakeLTRB(10, 10, 40, 40)));
+ REPORTER_ASSERT(r, sloppy_rect_eq(bbh.fEntries[1].bounds, SkRect::MakeLTRB(20, 20, 30, 30)));
+ REPORTER_ASSERT(r, sloppy_rect_eq(bbh.fEntries[2].bounds, SkRect::MakeLTRB(10, 10, 40, 40)));
+ }
}
DEF_TEST(RecordDraw_drawImage, r){
« no previous file with comments | « tests/PictureTest.cpp ('k') | tests/RecordOptsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698