aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/CanvasTest.cpp
diff options
context:
space:
mode:
authorGravatar Florin Malita <fmalita@chromium.org>2017-04-19 08:39:48 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-04-28 20:44:44 +0000
commit135c908812874e1b1ee1b9dcaf7d55544d1f8e2a (patch)
tree069966e2d91bbf32edd127b5417c7a278664a241 /tests/CanvasTest.cpp
parent2a475eae622adc1e8fa29206be1eaf862c23548e (diff)
Remove temporary_internal_describeTopLayer
Change-Id: I035b7db84b524be13fb675b75bc402bc9b733cb5 Reviewed-on: https://skia-review.googlesource.com/13803 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
Diffstat (limited to 'tests/CanvasTest.cpp')
-rw-r--r--tests/CanvasTest.cpp39
1 files changed, 0 insertions, 39 deletions
diff --git a/tests/CanvasTest.cpp b/tests/CanvasTest.cpp
index fabd19574a..cca692b47a 100644
--- a/tests/CanvasTest.cpp
+++ b/tests/CanvasTest.cpp
@@ -541,45 +541,6 @@ static void NestedSaveRestoreWithFlushTestStep(SkCanvas* canvas, const TestData&
}
TEST_STEP(NestedSaveRestoreWithFlush, NestedSaveRestoreWithFlushTestStep);
-static void DescribeTopLayerTestStep(SkCanvas* canvas,
- const TestData& d,
- skiatest::Reporter* reporter,
- CanvasTestStep* testStep) {
- SkMatrix m;
- SkIRect r;
- // NOTE: adjustToTopLayer() does *not* reduce the clip size, even if the canvas
- // is smaller than 10x10!
-
- canvas->temporary_internal_describeTopLayer(&m, &r);
- REPORTER_ASSERT_MESSAGE(reporter, m.isIdentity(), testStep->assertMessage());
- REPORTER_ASSERT_MESSAGE(reporter, r == SkIRect::MakeXYWH(0, 0, 2, 2),
- testStep->assertMessage());
-
- // Putting a full-canvas layer on it should make no change to the results.
- SkRect layerBounds = SkRect::MakeXYWH(0.f, 0.f, 10.f, 10.f);
- canvas->saveLayer(layerBounds, nullptr);
- canvas->temporary_internal_describeTopLayer(&m, &r);
- REPORTER_ASSERT_MESSAGE(reporter, m.isIdentity(), testStep->assertMessage());
- REPORTER_ASSERT_MESSAGE(reporter, r == SkIRect::MakeXYWH(0, 0, 2, 2),
- testStep->assertMessage());
- canvas->restore();
-
- // Adding a translated layer translates the results.
- // Default canvas is only 2x2, so can't offset our layer by very much at all;
- // saveLayer() aborts if the bounds don't intersect.
- layerBounds = SkRect::MakeXYWH(1.f, 1.f, 6.f, 6.f);
- canvas->saveLayer(layerBounds, nullptr);
- canvas->temporary_internal_describeTopLayer(&m, &r);
- REPORTER_ASSERT_MESSAGE(reporter, m == SkMatrix::MakeTrans(-1.f, -1.f),
- testStep->assertMessage());
- REPORTER_ASSERT_MESSAGE(reporter, r == SkIRect::MakeXYWH(0, 0, 1, 1),
- testStep->assertMessage());
- canvas->restore();
-
-}
-TEST_STEP(DescribeTopLayer, DescribeTopLayerTestStep);
-
-
static void TestPdfDevice(skiatest::Reporter* reporter, const TestData& d, CanvasTestStep* step) {
SkDynamicMemoryWStream outStream;
sk_sp<SkDocument> doc(SkDocument::MakePDF(&outStream));