From f19421961c59ceabfb88a5c5cdf7c7e31a95b015 Mon Sep 17 00:00:00 2001 From: Mike Reed Date: Fri, 21 Jul 2017 14:24:29 -0400 Subject: don't rely on canvas->readPixels Bug: skia:3216 Change-Id: I01a8d0083c79c0fe71fbc4d8cfdde4fa6e48b636 Reviewed-on: https://skia-review.googlesource.com/25741 Commit-Queue: Mike Reed Reviewed-by: Brian Salomon --- tests/ImageNewShaderTest.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/ImageNewShaderTest.cpp') diff --git a/tests/ImageNewShaderTest.cpp b/tests/ImageNewShaderTest.cpp index fe01f04c94..638fa078f0 100644 --- a/tests/ImageNewShaderTest.cpp +++ b/tests/ImageNewShaderTest.cpp @@ -56,12 +56,12 @@ static void run_shader_test(skiatest::Reporter* reporter, SkSurface* sourceSurfa SkBitmap bmOrig; bmOrig.allocN32Pixels(info.width(), info.height()); - sourceSurface->getCanvas()->readPixels(bmOrig, 0, 0); + sourceSurface->readPixels(bmOrig, 0, 0); SkBitmap bm; bm.allocN32Pixels(info.width(), info.height()); - destinationCanvas->readPixels(bm, 0, 0); + destinationSurface->readPixels(bm, 0, 0); test_bitmap_equality(reporter, bmOrig, bm); @@ -83,7 +83,7 @@ static void run_shader_test(skiatest::Reporter* reporter, SkSurface* sourceSurfa SkBitmap bmt; bmt.allocN32Pixels(info.width(), info.height()); - destinationCanvas->readPixels(bmt, 0, 0); + destinationSurface->readPixels(bmt, 0, 0); // Test correctness { -- cgit v1.2.3