aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/ImageTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ImageTest.cpp')
-rw-r--r--tests/ImageTest.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/tests/ImageTest.cpp b/tests/ImageTest.cpp
index 619b52d6e2..49ab65b6a7 100644
--- a/tests/ImageTest.cpp
+++ b/tests/ImageTest.cpp
@@ -939,13 +939,9 @@ static void test_cross_context_image(skiatest::Reporter* reporter, const GrConte
otherTestContext->makeCurrent();
canvas->flush();
- // This readPixels call is needed for Vulkan to make sure the ReleaseProc is called.
- // Even though we flushed above, this does not guarantee the command buffer will finish
- // which is when we call the ReleaseProc. The readPixels forces a CPU sync so we know
- // that the command buffer has finished and we've called the ReleaseProc.
- SkBitmap bitmap;
- bitmap.allocPixels(info);
- canvas->readPixels(bitmap, 0, 0);
+ // This is specifically here for vulkan to guarantee the command buffer will finish
+ // which is when we call the ReleaseProc.
+ otherCtx->contextPriv().getGpu()->testingOnly_flushGpuAndSync();
}
// Case #6: Verify that only one context can be using the image at a time