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

Unified Diff: tests/DeferredCanvasTest.cpp

Issue 571053002: Revert of Picture Recording: fix the performance bottleneck in SkDeferredCanvas::isFullFrame (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Created 6 years, 3 months 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') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/DeferredCanvasTest.cpp
diff --git a/tests/DeferredCanvasTest.cpp b/tests/DeferredCanvasTest.cpp
index 89454256aa5aef49193603141f3260c39ec491ad..61af550e202fe84ac7fb4b628db50bf62199ab58 100644
--- a/tests/DeferredCanvasTest.cpp
+++ b/tests/DeferredCanvasTest.cpp
@@ -839,58 +839,6 @@
REPORTER_ASSERT(reporter, notificationCounter.fStorageAllocatedChangedCount == 1);
}
-static void TestDeferredCanvasGetCanvasSize(skiatest::Reporter* reporter) {
- SkRect rect;
- rect.setXYWH(SkIntToScalar(0), SkIntToScalar(0), SkIntToScalar(gWidth), SkIntToScalar(gHeight));
- SkRect clip;
- clip.setXYWH(SkIntToScalar(0), SkIntToScalar(0), SkIntToScalar(1), SkIntToScalar(1));
-
- SkPaint paint;
- SkISize size = SkISize::Make(gWidth, gHeight);
-
- SkAutoTUnref<SkSurface> surface(createSurface(0xFFFFFFFF));
- SkAutoTUnref<SkDeferredCanvas> canvas(SkDeferredCanvas::Create(surface.get()));
-
- for (int i = 0; i < 2; ++i) {
- if (i == 1) {
- SkSurface* newSurface = SkSurface::NewRasterPMColor(4, 4);
- canvas->setSurface(newSurface);
- size = SkISize::Make(4, 4);
- }
-
- // verify that canvas size is correctly initialized or set
- REPORTER_ASSERT(reporter, size == canvas->getCanvasSize());
-
- // Verify that clear, clip and draw the canvas will not change its size
- canvas->clear(0x00000000);
- canvas->clipRect(clip, SkRegion::kIntersect_Op, false);
- canvas->drawRect(rect, paint);
- REPORTER_ASSERT(reporter, size == canvas->getCanvasSize());
-
- // Verify that flush the canvas will not change its size
- canvas->flush();
- REPORTER_ASSERT(reporter, size == canvas->getCanvasSize());
-
- // Verify that clear canvas with saved state will not change its size
- canvas->save();
- canvas->clear(0xFFFFFFFF);
- REPORTER_ASSERT(reporter, size == canvas->getCanvasSize());
-
- // Verify that restore canvas state will not change its size
- canvas->restore();
- REPORTER_ASSERT(reporter, size == canvas->getCanvasSize());
-
- // Verify that clear within a layer will not change canvas size
- canvas->saveLayer(&clip, &paint);
- canvas->clear(0x00000000);
- REPORTER_ASSERT(reporter, size == canvas->getCanvasSize());
-
- // Verify that restore from a layer will not change canvas size
- canvas->restore();
- REPORTER_ASSERT(reporter, size == canvas->getCanvasSize());
- }
-}
-
DEF_TEST(DeferredCanvas_CPU, reporter) {
TestDeferredCanvasFlush(reporter);
TestDeferredCanvasSilentFlush(reporter);
@@ -902,7 +850,6 @@
TestDeferredCanvasBitmapSizeThreshold(reporter);
TestDeferredCanvasCreateCompatibleDevice(reporter);
TestDeferredCanvasWritePixelsToSurface(reporter);
- TestDeferredCanvasGetCanvasSize(reporter);
TestDeferredCanvasSurface(reporter, NULL);
TestDeferredCanvasSetSurface(reporter, NULL);
}
« no previous file with comments | « src/utils/SkDeferredCanvas.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698