Index: tests/ImageTest.cpp |
diff --git a/tests/ImageTest.cpp b/tests/ImageTest.cpp |
index 4d64b2364c216385f2c0e4f5dfbc5b87da6847c2..5e714eb9a45b6fc370e0928cfc7d7653cdbef3df 100644 |
--- a/tests/ImageTest.cpp |
+++ b/tests/ImageTest.cpp |
@@ -474,6 +474,16 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(SkImage_newTextureImage, reporter, contextInf |
} |
} |
} |
+ |
+DEF_GPUTEST_FOR_RENDERING_CONTEXTS(SkImage_drawAbandonedGpuImage, reporter, contextInfo) { |
+ auto context = contextInfo.grContext(); |
+ auto image = create_gpu_image(context); |
+ auto info = SkImageInfo::MakeN32(20, 20, kOpaque_SkAlphaType); |
+ auto surface(SkSurface::MakeRenderTarget(context, SkBudgeted::kNo, info)); |
+ as_IB(image)->peekTexture()->abandon(); |
+ surface->getCanvas()->drawImage(image, 0, 0); |
+} |
+ |
#endif |
// https://bug.skia.org/4390 |