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

Unified Diff: tests/CanvasTest.cpp

Issue 349213006: don't create explicit bitmapdevice when not needed (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 6 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 | « no previous file | no next file » | 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 f8e856ac00f98c84280791a96f940a86ab3af405..ae686762bae1e938272bf00ba91e2b88d2504338 100644
--- a/tests/CanvasTest.cpp
+++ b/tests/CanvasTest.cpp
@@ -805,8 +805,7 @@ static void TestProxyCanvasStateConsistency(
SkBitmap indirectStore;
createBitmap(&indirectStore, 0xFFFFFFFF);
- SkBitmapDevice indirectDevice(indirectStore);
- SkCanvas indirectCanvas(&indirectDevice);
+ SkCanvas indirectCanvas(indirectStore);
SkProxyCanvas proxyCanvas(&indirectCanvas);
testStep->setAssertMessageFormat(kProxyDrawAssertMessageFormat);
testStep->draw(&proxyCanvas, reporter);
@@ -828,13 +827,11 @@ static void TestNWayCanvasStateConsistency(
SkBitmap indirectStore1;
createBitmap(&indirectStore1, 0xFFFFFFFF);
- SkBitmapDevice indirectDevice1(indirectStore1);
- SkCanvas indirectCanvas1(&indirectDevice1);
+ SkCanvas indirectCanvas1(indirectStore1);
SkBitmap indirectStore2;
createBitmap(&indirectStore2, 0xFFFFFFFF);
- SkBitmapDevice indirectDevice2(indirectStore2);
- SkCanvas indirectCanvas2(&indirectDevice2);
+ SkCanvas indirectCanvas2(indirectStore2);
SkISize canvasSize = referenceCanvas.getDeviceSize();
SkNWayCanvas nWayCanvas(canvasSize.width(), canvasSize.height());
@@ -866,8 +863,7 @@ static void TestOverrideStateConsistency(skiatest::Reporter* reporter,
CanvasTestStep* testStep) {
SkBitmap referenceStore;
createBitmap(&referenceStore, 0xFFFFFFFF);
- SkBitmapDevice referenceDevice(referenceStore);
- SkCanvas referenceCanvas(&referenceDevice);
+ SkCanvas referenceCanvas(referenceStore);
testStep->setAssertMessageFormat(kCanvasDrawAssertMessageFormat);
testStep->draw(&referenceCanvas, reporter);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698