diff options
author | Robert Phillips <robertphillips@google.com> | 2018-03-15 11:15:19 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-03-15 16:51:36 +0000 |
commit | 7f4419696b8ef299a321561336c0353a5a7d8e61 (patch) | |
tree | cc3a3ece311892099a8730b7e65b4e283442d598 /tools/gpu/GrTest.cpp | |
parent | 4f4a53f94852f801d89d8e22c4511d34fa6907e2 (diff) |
Make CreateBackendFormatFromTexture shared code
TBR=bsalomon@google.com
Change-Id: I19e6e6c8dc32ba584738545d443de092e4987a5a
Reviewed-on: https://skia-review.googlesource.com/114374
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'tools/gpu/GrTest.cpp')
-rw-r--r-- | tools/gpu/GrTest.cpp | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/tools/gpu/GrTest.cpp b/tools/gpu/GrTest.cpp index e1a7924062..132f8a5054 100644 --- a/tools/gpu/GrTest.cpp +++ b/tools/gpu/GrTest.cpp @@ -78,30 +78,6 @@ GrBackendTexture CreateBackendTexture(GrBackend backend, int width, int height, } } -GrBackendFormat CreateBackendFormatFromTexture(const GrBackendTexture& tex) { - switch (tex.backend()) { -#ifdef SK_VULKAN - case kVulkan_GrBackend: { - const GrVkImageInfo* vkInfo = tex.getVkImageInfo(); - SkASSERT(vkInfo); - return GrBackendFormat::MakeVk(vkInfo->fFormat); - } -#endif - case kOpenGL_GrBackend: { - const GrGLTextureInfo* glInfo = tex.getGLTextureInfo(); - SkASSERT(glInfo); - return GrBackendFormat::MakeGL(glInfo->fFormat, glInfo->fTarget); - } - case kMock_GrBackend: { - const GrMockTextureInfo* mockInfo = tex.getMockTextureInfo(); - SkASSERT(mockInfo); - return GrBackendFormat::MakeMock(mockInfo->fConfig); - } - default: - return GrBackendFormat(); - } -} - } // namespace GrTest bool GrSurfaceProxy::isWrapped_ForTesting() const { |