aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar robertphillips <robertphillips@google.com>2014-06-03 10:04:47 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-06-03 10:04:47 -0700
commitdcf9ab14a194be0cbea896e1dc44a2a04106a38b (patch)
treedb433629b2484484f01ad6b9578a9da8defe4464 /tests
parent66aa609a493b10d7c0a0101e2e16ba11e4c276a2 (diff)
Remove legacy picture recording
This is unblocked now that Android no longer uses the old interface. This is just the first step in cleaning this up. Future CLs will constify SkPicture access in SkCanvas and split up the SkPicture/SkPicturePlayback/SkPictureRecord trio. R=bsalomon@google.com, reed@google.com, mtklein@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/313613002
Diffstat (limited to 'tests')
-rw-r--r--tests/PictureTest.cpp43
1 files changed, 0 insertions, 43 deletions
diff --git a/tests/PictureTest.cpp b/tests/PictureTest.cpp
index d27b463583..494b4ed8d4 100644
--- a/tests/PictureTest.cpp
+++ b/tests/PictureTest.cpp
@@ -1103,49 +1103,6 @@ static void test_unbalanced_save_restores(skiatest::Reporter* reporter) {
REPORTER_ASSERT(reporter, 4 == testCanvas.getSaveCount());
REPORTER_ASSERT(reporter, testCanvas.getTotalMatrix().isIdentity());
}
-
-#if defined(SK_SUPPORT_LEGACY_PICTURE_CAN_RECORD) && \
- defined(SK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES)
- set_canvas_to_save_count_4(&testCanvas);
-
- // Due to "fake" endRecording, the old SkPicture recording interface
- // allowed unbalanced saves/restores to leak out. This sub-test checks
- // that the situation has been remedied.
- {
- SkPicture p;
-
- SkCanvas* canvas = p.beginRecording(100, 100);
- for (int i = 0; i < 4; ++i) {
- canvas->save();
- }
- SkRect r = SkRect::MakeWH(50, 50);
- SkPaint paint;
- canvas->drawRect(r, paint);
-
- // Check that copying a mid-recording picture does not result in unbalanced saves/restores
- SkPicture p2(p);
-
- testCanvas.drawPicture(p2);
- REPORTER_ASSERT(reporter, 4 == testCanvas.getSaveCount());
- set_canvas_to_save_count_4(&testCanvas);
-
- // Check that cloning a mid-recording picture does not result in unbalanced saves/restores
- SkAutoTUnref<SkPicture> p3(p.clone());
- testCanvas.drawPicture(*p3);
- REPORTER_ASSERT(reporter, 4 == testCanvas.getSaveCount());
- set_canvas_to_save_count_4(&testCanvas);
-
- // Check that serializing a mid-recording picture doesn't result in unbalanced
- // saves/restores
- SkDynamicMemoryWStream wStream;
- p.serialize(&wStream);
- SkAutoDataUnref data(wStream.copyToData());
- SkMemoryStream stream(data);
- SkAutoTUnref<SkPicture> p4(SkPicture::CreateFromStream(&stream, NULL));
- testCanvas.drawPicture(*p4);
- REPORTER_ASSERT(reporter, 4 == testCanvas.getSaveCount());
- }
-#endif
}
static void test_peephole() {