Make more tests exercise rendertargetless textures.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4322
Change-Id: I442041cd5d74768f0981eedcc17be7256e0e0b37
Reviewed-on: https://skia-review.googlesource.com/4322
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
diff --git a/tests/ReadPixelsTest.cpp b/tests/ReadPixelsTest.cpp
index 5fa7dd1..1550c6d 100644
--- a/tests/ReadPixelsTest.cpp
+++ b/tests/ReadPixelsTest.cpp
@@ -472,18 +472,18 @@
}
DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ReadPixels_Texture, reporter, ctxInfo) {
// On the GPU we will also try reading back from a non-renderable texture.
- for (auto& origin : {kBottomLeft_GrSurfaceOrigin, kTopLeft_GrSurfaceOrigin}) {
- SkAutoTUnref<GrTexture> texture;
- GrSurfaceDesc desc;
- desc.fFlags = kRenderTarget_GrSurfaceFlag;
- desc.fWidth = DEV_W;
- desc.fHeight = DEV_H;
- desc.fConfig = kSkia8888_GrPixelConfig;
- desc.fOrigin = origin;
- desc.fFlags = kNone_GrSurfaceFlags;
- texture.reset(ctxInfo.grContext()->textureProvider()->createTexture(desc,
- SkBudgeted::kNo));
- test_readpixels_texture(reporter, texture);
+ for (auto origin : {kBottomLeft_GrSurfaceOrigin, kTopLeft_GrSurfaceOrigin}) {
+ for (auto flags : {kNone_GrSurfaceFlags, kRenderTarget_GrSurfaceFlag}) {
+ GrSurfaceDesc desc;
+ desc.fFlags = flags;
+ desc.fWidth = DEV_W;
+ desc.fHeight = DEV_H;
+ desc.fConfig = kSkia8888_GrPixelConfig;
+ desc.fOrigin = origin;
+ sk_sp<GrTexture> texture(ctxInfo.grContext()->textureProvider()->createTexture(desc,
+ SkBudgeted::kNo));
+ test_readpixels_texture(reporter, texture.get());
+ }
}
}
#endif