From 12e946b4bfdf598bffb276776ea6e25439e25265 Mon Sep 17 00:00:00 2001 From: Mike Reed Date: Mon, 17 Apr 2017 10:53:29 -0400 Subject: deprecate odd variants of SkCanvas::readPixels Bug: skia:6513 Change-Id: I51179a85f0912d3f899c368c30a943d346dd1d05 Reviewed-on: https://skia-review.googlesource.com/13589 Reviewed-by: Florin Malita Reviewed-by: Matt Sarett Commit-Queue: Mike Reed --- tests/WritePixelsTest.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/WritePixelsTest.cpp') 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; } -- cgit v1.2.3