aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar junov <junov@chromium.org>2014-12-15 11:34:06 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2014-12-15 11:34:06 -0800
commit3fcc125c776c837aa858598ce385f5c6f8f01795 (patch)
treef8743cacfe50db57ac991c483d2ab324e6f7b6e2 /tests
parent41c9cbe0cee64b28a392a92409f58cd33dc0fed1 (diff)
Remove SkCanvas::isDrawingToLayer
Diffstat (limited to 'tests')
-rw-r--r--tests/CanvasTest.cpp35
-rw-r--r--tests/RecorderTest.cpp26
2 files changed, 0 insertions, 61 deletions
diff --git a/tests/CanvasTest.cpp b/tests/CanvasTest.cpp
index 1f8f2760b5..b55f833a52 100644
--- a/tests/CanvasTest.cpp
+++ b/tests/CanvasTest.cpp
@@ -471,39 +471,6 @@ static void SaveRestoreTestStep(SkCanvas* canvas, const TestData& d,
}
TEST_STEP(SaveRestore, SaveRestoreTestStep);
-static void DrawLayerTestStep(SkCanvas* canvas, const TestData& d,
- skiatest::Reporter* reporter, CanvasTestStep* testStep) {
- REPORTER_ASSERT_MESSAGE(reporter, !canvas->isDrawingToLayer(),
- testStep->assertMessage());
- canvas->save();
- REPORTER_ASSERT_MESSAGE(reporter, !canvas->isDrawingToLayer(),
- testStep->assertMessage());
- canvas->restore();
-
- const SkRect* bounds = NULL; // null means include entire bounds
- const SkPaint* paint = NULL;
-
- canvas->saveLayer(bounds, paint);
- REPORTER_ASSERT_MESSAGE(reporter, canvas->isDrawingToLayer(),
- testStep->assertMessage());
- canvas->restore();
- REPORTER_ASSERT_MESSAGE(reporter, !canvas->isDrawingToLayer(),
- testStep->assertMessage());
-
- canvas->saveLayer(bounds, paint);
- canvas->saveLayer(bounds, paint);
- REPORTER_ASSERT_MESSAGE(reporter, canvas->isDrawingToLayer(),
- testStep->assertMessage());
- canvas->restore();
- REPORTER_ASSERT_MESSAGE(reporter, canvas->isDrawingToLayer(),
- testStep->assertMessage());
- canvas->restore();
- // now layer count should be 0
- REPORTER_ASSERT_MESSAGE(reporter, !canvas->isDrawingToLayer(),
- testStep->assertMessage());
-}
-TEST_STEP(DrawLayer, DrawLayerTestStep);
-
static void NestedSaveRestoreWithSolidPaintTestStep(SkCanvas* canvas, const TestData& d,
skiatest::Reporter*, CanvasTestStep*) {
// This test step challenges the TestDeferredCanvasStateConsistency
@@ -551,8 +518,6 @@ static void AssertCanvasStatesEqual(skiatest::Reporter* reporter, const TestData
canvas2->getDeviceSize(), testStep->assertMessage());
REPORTER_ASSERT_MESSAGE(reporter, canvas1->getSaveCount() ==
canvas2->getSaveCount(), testStep->assertMessage());
- REPORTER_ASSERT_MESSAGE(reporter, canvas1->isDrawingToLayer() ==
- canvas2->isDrawingToLayer(), testStep->assertMessage());
SkRect bounds1, bounds2;
REPORTER_ASSERT_MESSAGE(reporter,
diff --git a/tests/RecorderTest.cpp b/tests/RecorderTest.cpp
index 7a2755699f..e0abacef38 100644
--- a/tests/RecorderTest.cpp
+++ b/tests/RecorderTest.cpp
@@ -125,32 +125,6 @@ DEF_TEST(Recorder_RefPictures, r) {
REPORTER_ASSERT(r, pic->unique());
}
-DEF_TEST(Recorder_IsDrawingToLayer, r) {
- SkRecord record;
- SkRecorder recorder(&record, 100, 100);
-
- // We'll save, saveLayer, save, and saveLayer, then restore them all,
- // checking that isDrawingToLayer() is correct at each step.
-
- REPORTER_ASSERT(r, !recorder.isDrawingToLayer());
- recorder.save();
- REPORTER_ASSERT(r, !recorder.isDrawingToLayer());
- recorder.saveLayer(NULL, NULL);
- REPORTER_ASSERT(r, recorder.isDrawingToLayer());
- recorder.save();
- REPORTER_ASSERT(r, recorder.isDrawingToLayer());
- recorder.saveLayer(NULL, NULL);
- REPORTER_ASSERT(r, recorder.isDrawingToLayer());
- recorder.restore();
- REPORTER_ASSERT(r, recorder.isDrawingToLayer());
- recorder.restore();
- REPORTER_ASSERT(r, recorder.isDrawingToLayer());
- recorder.restore();
- REPORTER_ASSERT(r, !recorder.isDrawingToLayer());
- recorder.restore();
- REPORTER_ASSERT(r, !recorder.isDrawingToLayer());
-}
-
DEF_TEST(Recorder_drawImage_takeReference, reporter) {
SkAutoTUnref<SkImage> image;