Remove Skia's use of the default SkPicture constructor and multi-clone
This cannot be landed until (Chrome: Switch to one-at-a-time SkPicture::clone interface - https://codereview.chromium.org/380323002/) has landed.
R=mtklein@google.com
TBR=reed@google.com
Review URL: https://codereview.chromium.org/388833003
diff --git a/tests/PictureTest.cpp b/tests/PictureTest.cpp
index a4dc7d7..cc5d880 100644
--- a/tests/PictureTest.cpp
+++ b/tests/PictureTest.cpp
@@ -1521,12 +1521,12 @@
static void test_gen_id(skiatest::Reporter* reporter) {
- SkPicture empty;
+ SkPictureRecorder recorder;
+ recorder.beginRecording(0, 0);
+ SkAutoTUnref<SkPicture> empty(recorder.endRecording());
// Empty pictures should still have a valid ID
- REPORTER_ASSERT(reporter, empty.uniqueID() != SK_InvalidGenID);
-
- SkPictureRecorder recorder;
+ REPORTER_ASSERT(reporter, empty->uniqueID() != SK_InvalidGenID);
SkCanvas* canvas = recorder.beginRecording(1, 1);
canvas->drawARGB(255, 255, 255, 255);
@@ -1535,7 +1535,7 @@
REPORTER_ASSERT(reporter, hasData->uniqueID() != SK_InvalidGenID);
// both pictures should have different ids
- REPORTER_ASSERT(reporter, hasData->uniqueID() != empty.uniqueID());
+ REPORTER_ASSERT(reporter, hasData->uniqueID() != empty->uniqueID());
}
DEF_TEST(Picture, reporter) {