From 5c77975e4c00e18e644c72b56f369858acd11b15 Mon Sep 17 00:00:00 2001 From: Eric Karl Date: Mon, 8 May 2017 12:02:07 -0700 Subject: Add flag to avoid stencil buffers in Skia Certain systems experience a leak in the GL driver associated with stencil buffers. Attempts to avoid the leak (while still using stencil buffers) dind't succeed. This patch adds a GrContextOption fAvoidStencilBuffers. This disables certain path rendering modes, as well as stencil based masking/clipping. Bug: 713854 Change-Id: Ifa6c0f2bd5ee395547bda9165d6c79d197ae8b8b Reviewed-on: https://skia-review.googlesource.com/15253 Commit-Queue: Eric Karl Reviewed-by: Eric Karl Reviewed-by: Brian Salomon --- src/gpu/GrCaps.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/gpu/GrCaps.cpp') diff --git a/src/gpu/GrCaps.cpp b/src/gpu/GrCaps.cpp index 57ab5fdece..4acf90ea13 100644 --- a/src/gpu/GrCaps.cpp +++ b/src/gpu/GrCaps.cpp @@ -77,6 +77,7 @@ GrCaps::GrCaps(const GrContextOptions& options) { fUseDrawInsteadOfPartialRenderTargetWrite = options.fUseDrawInsteadOfPartialRenderTargetWrite; fUseDrawInsteadOfAllRenderTargetWrites = false; fAvoidInstancedDrawsToFPTargets = false; + fAvoidStencilBuffers = false; fPreferVRAMUseOverFlushes = true; } @@ -95,6 +96,7 @@ void GrCaps::applyOptionsOverrides(const GrContextOptions& options) { GrWindowRectangles::kMaxWindows, fMaxWindowRectangles); fMaxWindowRectangles = GrWindowRectangles::kMaxWindows; } + fAvoidStencilBuffers = options.fAvoidStencilBuffers; } static SkString map_flags_to_string(uint32_t flags) { -- cgit v1.2.3