aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/gpu/GrBackendSurface.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/gpu/GrBackendSurface.h')
-rw-r--r--include/gpu/GrBackendSurface.h47
1 files changed, 16 insertions, 31 deletions
diff --git a/include/gpu/GrBackendSurface.h b/include/gpu/GrBackendSurface.h
index 60a9eb5009..232f220282 100644
--- a/include/gpu/GrBackendSurface.h
+++ b/include/gpu/GrBackendSurface.h
@@ -10,38 +10,31 @@
#include "GrTypes.h"
#include "gl/GrGLTypes.h"
-
-#ifdef SK_VULKAN
#include "vk/GrVkTypes.h"
-#endif
class GrBackendTexture {
public:
GrBackendTexture(int width,
int height,
- GrPixelConfig config,
- const GrGLTextureInfo& glInfo);
+ const GrVkImageInfo& vkInfo);
-#ifdef SK_VULKAN
GrBackendTexture(int width,
int height,
- const GrVkImageInfo& vkInfo);
-#endif
+ GrPixelConfig config,
+ const GrGLTextureInfo& glInfo);
int width() const { return fWidth; }
int height() const { return fHeight; }
GrPixelConfig config() const { return fConfig; }
GrBackend backend() const {return fBackend; }
- // If the backend API is GL, this returns a pointer to the GrGLTextureInfo struct. Otherwise
- // it returns nullptr.
- const GrGLTextureInfo* getGLTextureInfo() const;
-
-#ifdef SK_VULKAN
// If the backend API is Vulkan, this returns a pointer to the GrVkImageInfo struct. Otherwise
// it returns nullptr.
const GrVkImageInfo* getVkImageInfo() const;
-#endif
+
+ // If the backend API is GL, this returns a pointer to the GrGLTextureInfo struct. Otherwise
+ // it returns nullptr.
+ const GrGLTextureInfo* getGLTextureInfo() const;
private:
// Temporary constructor which can be used to convert from a GrBackendTextureDesc.
@@ -57,10 +50,8 @@ private:
GrBackend fBackend;
union {
- GrGLTextureInfo fGLInfo;
-#ifdef SK_VULKAN
GrVkImageInfo fVkInfo;
-#endif
+ GrGLTextureInfo fGLInfo;
};
};
@@ -70,16 +61,14 @@ public:
int height,
int sampleCnt,
int stencilBits,
- GrPixelConfig config,
- const GrGLFramebufferInfo& glInfo);
+ const GrVkImageInfo& vkInfo);
-#ifdef SK_VULKAN
GrBackendRenderTarget(int width,
int height,
int sampleCnt,
int stencilBits,
- const GrVkImageInfo& vkInfo);
-#endif
+ GrPixelConfig config,
+ const GrGLFramebufferInfo& glInfo);
int width() const { return fWidth; }
int height() const { return fHeight; }
@@ -88,15 +77,13 @@ public:
GrPixelConfig config() const { return fConfig; }
GrBackend backend() const {return fBackend; }
- // If the backend API is GL, this returns a pointer to the GrGLFramebufferInfo struct. Otherwise
- // it returns nullptr.
- const GrGLFramebufferInfo* getGLFramebufferInfo() const;
-
-#ifdef SK_VULKAN
// If the backend API is Vulkan, this returns a pointer to the GrVkImageInfo struct. Otherwise
// it returns nullptr
const GrVkImageInfo* getVkImageInfo() const;
-#endif
+
+ // If the backend API is GL, this returns a pointer to the GrGLFramebufferInfo struct. Otherwise
+ // it returns nullptr.
+ const GrGLFramebufferInfo* getGLFramebufferInfo() const;
private:
// Temporary constructor which can be used to convert from a GrBackendRenderTargetDesc.
@@ -115,10 +102,8 @@ private:
GrBackend fBackend;
union {
- GrGLFramebufferInfo fGLInfo;
-#ifdef SK_VULKAN
GrVkImageInfo fVkInfo;
-#endif
+ GrGLFramebufferInfo fGLInfo;
};
};