Defer saves() until they're needed
patch from issue 759443006 at patchset 40001 (http://crrev.com/759443006#ps40001)
BUG=skia:
Review URL: https://codereview.chromium.org/767333002
diff --git a/tests/PictureBBHTest.cpp b/tests/PictureBBHTest.cpp
index bc712f5..562d9b5 100644
--- a/tests/PictureBBHTest.cpp
+++ b/tests/PictureBBHTest.cpp
@@ -119,7 +119,8 @@
// Should be Clip - Save - Clear - Restore.
// Buggy implementations might return 1 (just Clip) or 3 (Clip - Save - Restore).
- REPORTER_ASSERT(r, dstPic->approximateOpCount() == 4);
+ // TODO: can we just search that it contains "clear"? <reed>
+ REPORTER_ASSERT(r, dstPic->approximateOpCount() == 4 || dstPic->approximateOpCount() == 2);
}
DEF_TEST(PictureBBH_Clear, r) {