aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/gpu/GrTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/gpu/GrTest.cpp')
-rw-r--r--tools/gpu/GrTest.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/tools/gpu/GrTest.cpp b/tools/gpu/GrTest.cpp
index 5a9fc9690e..f486993bbc 100644
--- a/tools/gpu/GrTest.cpp
+++ b/tools/gpu/GrTest.cpp
@@ -61,14 +61,15 @@ void SetupAlwaysEvictAtlas(GrContext* context) {
GrBackendTexture CreateBackendTexture(GrBackend backend, int width, int height,
GrPixelConfig config, GrBackendObject handle) {
- if (kOpenGL_GrBackend == backend) {
- GrGLTextureInfo* glInfo = (GrGLTextureInfo*)(handle);
- return GrBackendTexture(width, height, config, *glInfo);
- } else {
- SkASSERT(kVulkan_GrBackend == backend);
+#if SK_VULKAN
+ if (kVulkan_GrBackend == backend) {
GrVkImageInfo* vkInfo = (GrVkImageInfo*)(handle);
return GrBackendTexture(width, height, *vkInfo);
}
+#endif
+ SkASSERT(kOpenGL_GrBackend == backend);
+ GrGLTextureInfo* glInfo = (GrGLTextureInfo*)(handle);
+ return GrBackendTexture(width, height, config, *glInfo);
}
};