| 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 ee7516b4db403403b85c3924433c774ad5cd5c8f..fd58f162a803234382b86e3be08ef69e4f779df6 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/gl/GrGLInterface.h"
|
| @@ -20,13 +21,16 @@
|
| namespace skia_bindings {
|
|
|
| GrContextForGLES2Interface::GrContextForGLES2Interface(
|
| - gpu::gles2::GLES2Interface* gl) {
|
| + gpu::gles2::GLES2Interface* gl,
|
| + const gpu::Capabilities& capabilities) {
|
| + GrContextOptions options;
|
| + options.fAvoidStencilBuffers = capabilities.avoid_stencil_buffers;
|
| sk_sp<GrGLInterface> interface(
|
| skia_bindings::CreateGLES2InterfaceBindings(gl));
|
| - gr_context_ = sk_sp<GrContext>(
|
| - GrContext::Create(kOpenGL_GrBackend,
|
| - // GrContext takes ownership of |interface|.
|
| - reinterpret_cast<GrBackendContext>(interface.get())));
|
| + gr_context_ = sk_sp<GrContext>(GrContext::Create(
|
| + kOpenGL_GrBackend,
|
| + // GrContext takes ownership of |interface|.
|
| + reinterpret_cast<GrBackendContext>(interface.get()), options));
|
| if (gr_context_) {
|
| // The limit of the number of GPU resources we hold in the GrContext's
|
| // GPU cache.
|
|
|