diff options
author | Robert Phillips <robertphillips@google.com> | 2017-12-13 15:00:45 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-12-13 21:34:20 +0000 |
commit | b67821da87ffa711c07af75ee618b13dbccd6b7d (patch) | |
tree | 25179bbe05f6104f0314458f4cdd52475dfed73e /tests/GrMipMappedTest.cpp | |
parent | 81d9f0d42eea5bb428808e0a48e4ef85aec45e10 (diff) |
Add GrBackendTexture & GrBackendRenderTarget access methods to GrTexture and GrRenderTarget
Change-Id: I627fcc2cab1d04169f49e33a6c17e161e9a9772a
Reviewed-on: https://skia-review.googlesource.com/84621
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'tests/GrMipMappedTest.cpp')
-rw-r--r-- | tests/GrMipMappedTest.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/tests/GrMipMappedTest.cpp b/tests/GrMipMappedTest.cpp index 7caa4bb01c..58faec4f8b 100644 --- a/tests/GrMipMappedTest.cpp +++ b/tests/GrMipMappedTest.cpp @@ -159,21 +159,19 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(GrBackendTextureImageMipMappedTest, reporter, return; } - GrBackendObject genBackendObject = genTexture->getTextureHandle(); + GrBackendTexture genBackendTex = genTexture->getBackendTexture(); - if (kOpenGL_GrBackend == context->contextPriv().getBackend()) { + if (const GrGLTextureInfo* genTexInfo = genBackendTex.getGLTextureInfo()) { const GrGLTextureInfo* origTexInfo = backendTex.getGLTextureInfo(); - GrGLTextureInfo* genTexInfo = (GrGLTextureInfo*)genBackendObject; if (willUseMips && GrMipMapped::kNo == mipMapped) { // We did a copy so the texture IDs should be different REPORTER_ASSERT(reporter, origTexInfo->fID != genTexInfo->fID); } else { REPORTER_ASSERT(reporter, origTexInfo->fID == genTexInfo->fID); } - } else if (kVulkan_GrBackend == context->contextPriv().getBackend()) { #ifdef SK_VULKAN + } else if (const GrVkImageInfo* genImageInfo = genBackendTex.getVkImageInfo()) { const GrVkImageInfo* origImageInfo = backendTex.getVkImageInfo(); - GrVkImageInfo* genImageInfo = (GrVkImageInfo*)genBackendObject; if (willUseMips && GrMipMapped::kNo == mipMapped) { // We did a copy so the texture IDs should be different REPORTER_ASSERT(reporter, origImageInfo->fImage != genImageInfo->fImage); @@ -181,8 +179,6 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(GrBackendTextureImageMipMappedTest, reporter, REPORTER_ASSERT(reporter, origImageInfo->fImage == genImageInfo->fImage); } #endif - } else if (kMetal_GrBackend == context->contextPriv().getBackend()) { - REPORTER_ASSERT(reporter, false); } else { REPORTER_ASSERT(reporter, false); } |