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

Unified Diff: tests/CanvasTest.cpp

Issue 803913005: Remove SkCanvas::isDrawingToLayer (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: init fix Created 6 years 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 | « src/utils/SkDeferredCanvas.cpp ('k') | tests/RecorderTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/CanvasTest.cpp
diff --git a/tests/CanvasTest.cpp b/tests/CanvasTest.cpp
index 1f8f2760b5c150355920134af12f87063491965c..b55f833a527e492c2b8142a97085b03009a0ec1a 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,
« no previous file with comments | « src/utils/SkDeferredCanvas.cpp ('k') | tests/RecorderTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698