aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrBackendSurface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/GrBackendSurface.cpp')
-rw-r--r--src/gpu/GrBackendSurface.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/gpu/GrBackendSurface.cpp b/src/gpu/GrBackendSurface.cpp
index 73135dc42c..6db618f717 100644
--- a/src/gpu/GrBackendSurface.cpp
+++ b/src/gpu/GrBackendSurface.cpp
@@ -153,10 +153,19 @@ GrBackendRenderTarget::GrBackendRenderTarget(int width,
int sampleCnt,
int stencilBits,
const GrVkImageInfo& vkInfo)
+ : GrBackendRenderTarget(width, height, sampleCnt, vkInfo) {
+ // This is a deprecated constructor that takes a bogus stencil bits.
+ SkASSERT(0 == stencilBits);
+}
+
+GrBackendRenderTarget::GrBackendRenderTarget(int width,
+ int height,
+ int sampleCnt,
+ const GrVkImageInfo& vkInfo)
: fWidth(width)
, fHeight(height)
, fSampleCnt(SkTMax(1, sampleCnt))
- , fStencilBits(stencilBits)
+ , fStencilBits(0) // We always create stencil buffers internally for vulkan
, fConfig(GrVkFormatToPixelConfig(vkInfo.fFormat))
, fBackend(kVulkan_GrBackend)
, fVkInfo(vkInfo) {}