Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(268)

Unified Diff: gpu/skia_bindings/grcontext_for_gles2_interface.cc

Issue 2866353002: Add workaround for Mac stencil buffer leak (Closed)
Patch Set: Fix analyze issue Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: gpu/skia_bindings/grcontext_for_gles2_interface.cc
diff --git a/gpu/skia_bindings/grcontext_for_gles2_interface.cc b/gpu/skia_bindings/grcontext_for_gles2_interface.cc
index a4965a8361795a535cae4009feedf7c4ee1d18ae..f636f7161565bd0d51418e634e266ac1e8abd7bc 100644
--- a/gpu/skia_bindings/grcontext_for_gles2_interface.cc
+++ b/gpu/skia_bindings/grcontext_for_gles2_interface.cc
@@ -13,6 +13,7 @@
#include "base/sys_info.h"
#include "base/trace_event/trace_event.h"
#include "gpu/command_buffer/client/gles2_interface.h"
+#include "gpu/command_buffer/common/capabilities.h"
#include "gpu/skia_bindings/gl_bindings_skia_cmd_buffer.h"
#include "third_party/skia/include/gpu/GrContext.h"
#include "third_party/skia/include/gpu/GrContextOptions.h"
@@ -21,7 +22,8 @@
namespace skia_bindings {
GrContextForGLES2Interface::GrContextForGLES2Interface(
- gpu::gles2::GLES2Interface* gl) {
+ gpu::gles2::GLES2Interface* gl,
+ const gpu::Capabilities& capabilities) {
// Calculate limits to pass during initialization:
// The limit of the number of GPU resources we hold in the GrContext's
// GPU cache.
@@ -50,6 +52,7 @@ GrContextForGLES2Interface::GrContextForGLES2Interface(
GrContextOptions options;
options.fGlyphCacheTextureMaximumBytes = max_glyph_cache_texture_bytes;
+ options.fAvoidStencilBuffers = capabilities.avoid_stencil_buffers;
sk_sp<GrGLInterface> interface(
skia_bindings::CreateGLES2InterfaceBindings(gl));
gr_context_ = sk_sp<GrContext>(GrContext::Create(
« no previous file with comments | « gpu/skia_bindings/grcontext_for_gles2_interface.h ('k') | services/ui/public/cpp/gpu/context_provider_command_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698