diff options
author | Robert Phillips <robertphillips@google.com> | 2017-06-13 22:16:08 +0000 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-06-13 22:16:19 +0000 |
commit | fad9e3f54112ea8c8bb6bb72384f47b9759578f5 (patch) | |
tree | b4a713dabc9aaa76149222a5816a35d7f3fa5417 /include/gpu | |
parent | 4f8c695736c8ae4fed2190a8e1301a4f4a979898 (diff) |
Revert "Update skia to use ifdefs for Vulkan code instead of dummy header"
This reverts commit c0f8e426c59eec6c720b8e1329dcb966cf1b6800.
Reason for revert: Experiment to see if this will unblock the Android roll
Original change's description:
> Update skia to use ifdefs for Vulkan code instead of dummy header
>
> Bug: skia:6721
> Change-Id: I80a4c9f2acc09c174497f625c50ed12a8bb76505
> Reviewed-on: https://skia-review.googlesource.com/19547
> Reviewed-by: Mike Klein <mtklein@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>
TBR=egdaniel@google.com,mtklein@google.com,bsalomon@google.com
Change-Id: Ib51c1672570f2071a17b6fbde692a5174b0358ce
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:6721
Reviewed-on: https://skia-review.googlesource.com/19724
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'include/gpu')
-rw-r--r-- | include/gpu/GrBackendSurface.h | 47 | ||||
-rw-r--r-- | include/gpu/vk/GrVkDefines.h | 4 |
2 files changed, 18 insertions, 33 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; }; }; diff --git a/include/gpu/vk/GrVkDefines.h b/include/gpu/vk/GrVkDefines.h index 0bc6fb0343..7defed2ad5 100644 --- a/include/gpu/vk/GrVkDefines.h +++ b/include/gpu/vk/GrVkDefines.h @@ -31,6 +31,8 @@ # endif #endif +#endif + #include <vulkan/vulkan.h> #define SKIA_REQUIRED_VULKAN_HEADER_VERSION 17 @@ -39,5 +41,3 @@ #endif #endif - -#endif |