aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/WritePixelsTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/WritePixelsTest.cpp')
-rw-r--r--tests/WritePixelsTest.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/WritePixelsTest.cpp b/tests/WritePixelsTest.cpp
index cace6b196e..bf2e64efc1 100644
--- a/tests/WritePixelsTest.cpp
+++ b/tests/WritePixelsTest.cpp
@@ -191,7 +191,8 @@ static bool check_write(skiatest::Reporter* reporter, SkCanvas* canvas, const Sk
// At some point this will be unsupported, as we won't allow accessBitmap() to magically call
// readPixels for the client.
SkBitmap secretDevBitmap;
- if (!canvas->readPixels(canvasInfo.bounds(), &secretDevBitmap)) {
+ secretDevBitmap.allocN32Pixels(canvasInfo.width(), canvasInfo.height());
+ if (!canvas->readPixels(secretDevBitmap, 0, 0)) {
return false;
}