diff options
Diffstat (limited to 'tests/ReadPixelsTest.cpp')
-rw-r--r-- | tests/ReadPixelsTest.cpp | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/tests/ReadPixelsTest.cpp b/tests/ReadPixelsTest.cpp index 697d3ee99e..89706ac5c0 100644 --- a/tests/ReadPixelsTest.cpp +++ b/tests/ReadPixelsTest.cpp @@ -124,7 +124,6 @@ static void fill_src_canvas(SkCanvas* canvas) { } static void fill_dst_bmp_with_init_data(SkBitmap* bitmap) { - SkAutoLockPixels alp(*bitmap); int w = bitmap->width(); int h = bitmap->height(); intptr_t pixels = reinterpret_cast<intptr_t>(bitmap->getPixels()); @@ -184,7 +183,6 @@ static bool check_read(skiatest::Reporter* reporter, if (!clippedSrcRect.intersect(srcRect)) { clippedSrcRect.setEmpty(); } - SkAutoLockPixels alp(bitmap); if (kAlpha_8_SkColorType == ct) { for (int by = 0; by < bh; ++by) { for (int bx = 0; bx < bw; ++bx) { @@ -440,11 +438,9 @@ static void test_readpixels_texture(skiatest::Reporter* reporter, if (gReadPixelsConfigs[c].fAlphaType == kUnpremul_SkAlphaType) { flags = GrContextPriv::kUnpremul_PixelOpsFlag; } - bmp.lockPixels(); bool success = sContext->readPixels(bmp.info(), bmp.getPixels(), bmp.rowBytes(), srcRect.fLeft, srcRect.fTop, flags); - bmp.unlockPixels(); check_read(reporter, bmp, srcRect.fLeft, srcRect.fTop, success, true, gReadPixelsConfigs[c].fColorType, gReadPixelsConfigs[c].fAlphaType); @@ -458,7 +454,6 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ReadPixels_Texture, reporter, ctxInfo) { GrContext* context = ctxInfo.grContext(); SkBitmap bmp = make_src_bitmap(); - bmp.lockPixels(); // On the GPU we will also try reading back from a non-renderable texture. for (auto origin : {kBottomLeft_GrSurfaceOrigin, kTopLeft_GrSurfaceOrigin}) { @@ -481,8 +476,6 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ReadPixels_Texture, reporter, ctxInfo) { test_readpixels_texture(reporter, std::move(sContext)); } } - - bmp.unlockPixels(); } #endif |