diff options
author | mtklein <mtklein@chromium.org> | 2014-06-27 12:34:44 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-06-27 12:34:44 -0700 |
commit | d3e474e20c6f0f24ddb6b2643e92975d60190daa (patch) | |
tree | f2e39eab8d338bc80f524904de5ab15bd4e0df5e /tests/PictureTest.cpp | |
parent | 67ec1f8eecfb48bc0a6ba04c0057f103c1c9696f (diff) |
Deprecate SkPicture::clone().
Chrome will need -DSK_SUPPORT_LEGACY_PICTURE_CLONE.
This removes the modes from our tools that use clone(). No
bots run these. DM used clone() in a way that we can just
share the picture now.
I plan to bring back the ability to test multithreaded
picture rendering soon.
BUG=skia:2378
R=robertphillips@google.com, mtklein@google.com, bsalomon@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/338633011
Diffstat (limited to 'tests/PictureTest.cpp')
-rw-r--r-- | tests/PictureTest.cpp | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/tests/PictureTest.cpp b/tests/PictureTest.cpp index 6ec1e0a022..e62a68ba9a 100644 --- a/tests/PictureTest.cpp +++ b/tests/PictureTest.cpp @@ -1274,19 +1274,6 @@ static void test_bitmap_with_encoded_data(skiatest::Reporter* reporter) { SkSetErrorCallback(NULL, NULL); } -static void test_clone_empty(skiatest::Reporter* reporter) { - // This is a regression test for crbug.com/172062 - // Before the fix, we used to crash accessing a null pointer when we - // had a picture with no paints. This test passes by not crashing. - { - SkPictureRecorder recorder; - recorder.beginRecording(1, 1); - SkAutoTUnref<SkPicture> picture(recorder.endRecording()); - SkAutoTUnref<SkPicture> destPicture(picture->clone()); - REPORTER_ASSERT(reporter, NULL != destPicture); - } -} - static void test_draw_empty(skiatest::Reporter* reporter) { SkBitmap result; make_bm(&result, 2, 2, SK_ColorBLACK, false); @@ -1556,15 +1543,6 @@ static void test_gen_id(skiatest::Reporter* reporter) { SkPicture emptyCopy(empty); REPORTER_ASSERT(reporter, empty.uniqueID() != emptyCopy.uniqueID()); - - // test out clone - { - SkAutoTUnref<SkPicture> cloneWithData(hasData->clone()); - REPORTER_ASSERT(reporter, hasData->uniqueID() == cloneWithData->uniqueID()); - - SkAutoTUnref<SkPicture> emptyClone(empty.clone()); - REPORTER_ASSERT(reporter, empty.uniqueID() != emptyClone->uniqueID()); - } } DEF_TEST(Picture, reporter) { @@ -1582,7 +1560,6 @@ DEF_TEST(Picture, reporter) { test_gatherpixelrefs(reporter); test_gatherpixelrefsandrects(reporter); test_bitmap_with_encoded_data(reporter); - test_clone_empty(reporter); test_draw_empty(reporter); test_clip_bound_opt(reporter); test_clip_expansion(reporter); |