aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrBackendSurface.cpp
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-06-13 22:16:08 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-06-13 22:16:19 +0000
commitfad9e3f54112ea8c8bb6bb72384f47b9759578f5 (patch)
treeb4a713dabc9aaa76149222a5816a35d7f3fa5417 /src/gpu/GrBackendSurface.cpp
parent4f8c695736c8ae4fed2190a8e1301a4f4a979898 (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 'src/gpu/GrBackendSurface.cpp')
-rw-r--r--src/gpu/GrBackendSurface.cpp24
1 files changed, 14 insertions, 10 deletions
diff --git a/src/gpu/GrBackendSurface.cpp b/src/gpu/GrBackendSurface.cpp
index 6c715228b2..63044759d4 100644
--- a/src/gpu/GrBackendSurface.cpp
+++ b/src/gpu/GrBackendSurface.cpp
@@ -12,16 +12,20 @@
#include "vk/GrVkUtil.h"
#endif
-#ifdef SK_VULKAN
GrBackendTexture::GrBackendTexture(int width,
int height,
const GrVkImageInfo& vkInfo)
: fWidth(width)
, fHeight(height)
- , fConfig(GrVkFormatToPixelConfig(vkInfo.fFormat))
+ , fConfig(
+#ifdef SK_VULKAN
+ GrVkFormatToPixelConfig(vkInfo.fFormat)
+#else
+ kUnknown_GrPixelConfig
+#endif
+ )
, fBackend(kVulkan_GrBackend)
, fVkInfo(vkInfo) {}
-#endif
GrBackendTexture::GrBackendTexture(int width,
int height,
@@ -53,14 +57,12 @@ GrBackendTexture::GrBackendTexture(const GrBackendTextureDesc& desc, GrBackend b
}
}
-#ifdef SK_VULKAN
const GrVkImageInfo* GrBackendTexture::getVkImageInfo() const {
if (kVulkan_GrBackend == fBackend) {
return &fVkInfo;
}
return nullptr;
}
-#endif
const GrGLTextureInfo* GrBackendTexture::getGLTextureInfo() const {
if (kOpenGL_GrBackend == fBackend) {
@@ -71,7 +73,6 @@ const GrGLTextureInfo* GrBackendTexture::getGLTextureInfo() const {
////////////////////////////////////////////////////////////////////////////////////////////////////
-#ifdef SK_VULKAN
GrBackendRenderTarget::GrBackendRenderTarget(int width,
int height,
int sampleCnt,
@@ -81,10 +82,15 @@ GrBackendRenderTarget::GrBackendRenderTarget(int width,
, fHeight(height)
, fSampleCnt(sampleCnt)
, fStencilBits(stencilBits)
- , fConfig(GrVkFormatToPixelConfig(vkInfo.fFormat))
+ , fConfig(
+#ifdef SK_VULKAN
+ GrVkFormatToPixelConfig(vkInfo.fFormat)
+#else
+ kUnknown_GrPixelConfig
+#endif
+ )
, fBackend(kVulkan_GrBackend)
, fVkInfo(vkInfo) {}
-#endif
GrBackendRenderTarget::GrBackendRenderTarget(int width,
int height,
@@ -123,14 +129,12 @@ GrBackendRenderTarget::GrBackendRenderTarget(const GrBackendRenderTargetDesc& de
}
}
-#ifdef SK_VULKAN
const GrVkImageInfo* GrBackendRenderTarget::getVkImageInfo() const {
if (kVulkan_GrBackend == fBackend) {
return &fVkInfo;
}
return nullptr;
}
-#endif
const GrGLFramebufferInfo* GrBackendRenderTarget::getGLFramebufferInfo() const {
if (kOpenGL_GrBackend == fBackend) {