Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(124)

Unified Diff: tests/ImageTest.cpp

Issue 2067133002: Add test for rendering an already abandoned texture-backed SkImage. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698