From 6de99041f13e87ed440f7db13a07693c6c4c461a Mon Sep 17 00:00:00 2001 From: Robert Phillips Date: Tue, 31 Jan 2017 11:31:39 -0500 Subject: Reduce use of SkImage_Base::peekTexture Change-Id: I079093c9706df4911d47fba04b786e59240e8cb4 Reviewed-on: https://skia-review.googlesource.com/7792 Reviewed-by: Brian Salomon Commit-Queue: Robert Phillips --- tests/SpecialImageTest.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tests/SpecialImageTest.cpp') diff --git a/tests/SpecialImageTest.cpp b/tests/SpecialImageTest.cpp index 33f394811a..551efff6c5 100644 --- a/tests/SpecialImageTest.cpp +++ b/tests/SpecialImageTest.cpp @@ -51,7 +51,7 @@ static SkBitmap create_bm() { // Basic test of the SkSpecialImage public API (e.g., peekTexture, peekPixels & draw) static void test_image(const sk_sp& img, skiatest::Reporter* reporter, - GrContext* context, bool peekTextureSucceeds, + GrContext* context, bool isGPUBacked, int offset, int size) { const SkIRect subset = img->subset(); REPORTER_ASSERT(reporter, offset == subset.left()); @@ -61,7 +61,7 @@ static void test_image(const sk_sp& img, skiatest::Reporter* rep //-------------- // Test that peekTexture reports the correct backing type - REPORTER_ASSERT(reporter, peekTextureSucceeds == img->isTextureBacked()); + REPORTER_ASSERT(reporter, isGPUBacked == img->isTextureBacked()); #if SK_SUPPORT_GPU //-------------- @@ -118,9 +118,9 @@ static void test_image(const sk_sp& img, skiatest::Reporter* rep REPORTER_ASSERT(reporter, tightImg->width() == subset.width()); REPORTER_ASSERT(reporter, tightImg->height() == subset.height()); - REPORTER_ASSERT(reporter, peekTextureSucceeds == !!tightImg->getTexture()); + REPORTER_ASSERT(reporter, isGPUBacked == !!tightImg->isTextureBacked()); SkPixmap tmpPixmap; - REPORTER_ASSERT(reporter, peekTextureSucceeds != !!tightImg->peekPixels(&tmpPixmap)); + REPORTER_ASSERT(reporter, isGPUBacked != !!tightImg->peekPixels(&tmpPixmap)); } { SkImageFilter::OutputProperties outProps(img->getColorSpace()); @@ -128,10 +128,10 @@ static void test_image(const sk_sp& img, skiatest::Reporter* rep REPORTER_ASSERT(reporter, tightSurf->width() == subset.width()); REPORTER_ASSERT(reporter, tightSurf->height() == subset.height()); - REPORTER_ASSERT(reporter, peekTextureSucceeds == + REPORTER_ASSERT(reporter, isGPUBacked == !!tightSurf->getTextureHandle(SkSurface::kDiscardWrite_BackendHandleAccess)); SkPixmap tmpPixmap; - REPORTER_ASSERT(reporter, peekTextureSucceeds != !!tightSurf->peekPixels(&tmpPixmap)); + REPORTER_ASSERT(reporter, isGPUBacked != !!tightSurf->peekPixels(&tmpPixmap)); } } -- cgit v1.2.3