Revert "Revert "Add 1010102 support to Ganesh""
This reverts commit ded47a50143470d1acdafa03e878cc7da5608038.
Bug: skia:
Change-Id: I7d7552e6ccc8591cae91426407ab13b628b93b68
Reviewed-on: https://skia-review.googlesource.com/111760
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
diff --git a/tests/SpecialSurfaceTest.cpp b/tests/SpecialSurfaceTest.cpp
index a336cf6..40de08d 100644
--- a/tests/SpecialSurfaceTest.cpp
+++ b/tests/SpecialSurfaceTest.cpp
@@ -80,12 +80,15 @@
#if SK_SUPPORT_GPU
DEF_GPUTEST_FOR_RENDERING_CONTEXTS(SpecialSurface_Gpu1, reporter, ctxInfo) {
- sk_sp<SkSpecialSurface> surf(SkSpecialSurface::MakeRenderTarget(ctxInfo.grContext(),
- kSmallerSize, kSmallerSize,
- kRGBA_8888_GrPixelConfig,
- nullptr));
-
- test_surface(surf, reporter, 0);
+ for (auto config : { kRGBA_8888_GrPixelConfig, kRGBA_1010102_GrPixelConfig }) {
+ if (!ctxInfo.grContext()->caps()->isConfigRenderable(config)) {
+ continue;
+ }
+ sk_sp<SkSpecialSurface> surf(SkSpecialSurface::MakeRenderTarget(ctxInfo.grContext(),
+ kSmallerSize, kSmallerSize,
+ config, nullptr));
+ test_surface(surf, reporter, 0);
+ }
}
#endif