aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/gpu/GrCaps.h3
-rw-r--r--include/gpu/GrContextOptions.h6
2 files changed, 9 insertions, 0 deletions
diff --git a/include/gpu/GrCaps.h b/include/gpu/GrCaps.h
index 92171204b3..17b5a23e18 100644
--- a/include/gpu/GrCaps.h
+++ b/include/gpu/GrCaps.h
@@ -79,6 +79,8 @@ public:
bool avoidInstancedDrawsToFPTargets() const { return fAvoidInstancedDrawsToFPTargets; }
+ bool avoidStencilBuffers() const { return fAvoidStencilBuffers; }
+
/**
* Indicates the capabilities of the fixed function blend unit.
*/
@@ -225,6 +227,7 @@ protected:
bool fUseDrawInsteadOfPartialRenderTargetWrite : 1;
bool fUseDrawInsteadOfAllRenderTargetWrites : 1;
bool fAvoidInstancedDrawsToFPTargets : 1;
+ bool fAvoidStencilBuffers : 1;
// ANGLE workaround
bool fPreferVRAMUseOverFlushes : 1;
diff --git a/include/gpu/GrContextOptions.h b/include/gpu/GrContextOptions.h
index 2e43e426af..d74f10ff63 100644
--- a/include/gpu/GrContextOptions.h
+++ b/include/gpu/GrContextOptions.h
@@ -110,6 +110,12 @@ struct GrContextOptions {
* The maximum size of cache textures used for Skia's Glyph cache.
*/
float fGlyphCacheTextureMaximumBytes = 2048 * 1024 * 4;
+
+ /**
+ * Bugs on certain drivers cause stencil buffers to leak. This flag causes Skia to avoid
+ * allocating stencil buffers and use alternate rasterization paths, avoiding the leak.
+ */
+ bool fAvoidStencilBuffers = false;
};
GR_MAKE_BITFIELD_CLASS_OPS(GrContextOptions::GpuPathRenderers)