diff options
author | reed <reed@google.com> | 2014-06-26 22:12:09 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-06-26 22:12:09 -0700 |
commit | 2a8ca93171041da39987ed455dfb3701f0d93ac6 (patch) | |
tree | 3b3c8d6aed6b0bc560009131e5e1515e96ab4433 | |
parent | 98e34ba89230bde5127e7767a6816485124b734e (diff) |
don't create explicit bitmapdevice when not needed
TBR=
Author: reed@google.com
Review URL: https://codereview.chromium.org/349213006
-rw-r--r-- | tests/CanvasTest.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/tests/CanvasTest.cpp b/tests/CanvasTest.cpp index f8e856ac00..ae686762ba 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); |