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

Unified Diff: tests/PictureTest.cpp

Issue 388833003: Remove Skia's use of the default SkPicture constructor and multi-clone (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix test Created 6 years, 5 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 | « tests/GpuLayerCacheTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/PictureTest.cpp
diff --git a/tests/PictureTest.cpp b/tests/PictureTest.cpp
index a4dc7d71024565963137effd07e0eb61788f83a2..cc5d880297287260165d6cba60b3b0fdc68b397d 100644
--- a/tests/PictureTest.cpp
+++ b/tests/PictureTest.cpp
@@ -1521,12 +1521,12 @@ static void test_hierarchical(skiatest::Reporter* reporter) {
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 @@ static void test_gen_id(skiatest::Reporter* reporter) {
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) {
« no previous file with comments | « tests/GpuLayerCacheTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698