aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/ResourceCacheTest.cpp
diff options
context:
space:
mode:
authorGravatar Brian Osman <brianosman@google.com>2017-06-01 11:01:33 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-06-01 15:28:07 +0000
commit9f6f41b01bdc8144808e78128676087bfb310a27 (patch)
tree6200d2eafc6ee95f334bb069418e51cfe4b21944 /tests/ResourceCacheTest.cpp
parent48567ac8ae15948c90af433f25c4c32f4aa76f10 (diff)
Expand texturability testing to cover mip-mapped textures, and fix iOS
Don't allow creation of mip-mapped textures when caps says we don't support mip-mapping. Skip testing of mip-mapped resources in the resource size test, when creation will fail. For iOS devices with ES2, the APPLE BGRA8888 extension is more trouble than it's worth. Even though it lets the internal and external formats not match, it appears that the driver remembers the first external format, so subsequent attempts to upload with the other swizzle will fail. Up until now, creation of these textures was failing anyway, so now just make it more explicit that we don't support BGRA in this situation. BUG=skia: Change-Id: Ic2e3ba1673398d542edd46a555ef47b5d0979c01 Reviewed-on: https://skia-review.googlesource.com/18261 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'tests/ResourceCacheTest.cpp')
-rw-r--r--tests/ResourceCacheTest.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/ResourceCacheTest.cpp b/tests/ResourceCacheTest.cpp
index 08f60ea1c5..460d4ee096 100644
--- a/tests/ResourceCacheTest.cpp
+++ b/tests/ResourceCacheTest.cpp
@@ -1714,7 +1714,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(GPUMemorySize, reporter, ctxInfo) {
// Mipmapped versions
- {
+ if (context->caps()->mipMapSupport()) {
sk_sp<GrTextureProxy> proxy;
proxy = make_mipmap_proxy(provider, kRenderTarget_GrSurfaceFlag, kSize, kSize, 0);