Prevent Skia from trying to use stencil buffers (flutter/engine#4362)
Fixes flutter/flutter#13018 When linear blending was disabled, we started rendering directly to FBO0 again. We can't attach stencil there, and the profile graph code triggers a path that (by default) uses it. This option forces us to use alternate rendering methods. Note that the graph rendering code is constructing a fairly complex path. It would probably be much faster to render as a simpler series of drawRect calls for each box (which would get batched inside Skia).
This commit is contained in:
@@ -33,8 +33,11 @@ GPUSurfaceGL::GPUSurfaceGL(GPUSurfaceGLDelegate* delegate)
|
||||
auto backend_context =
|
||||
reinterpret_cast<GrBackendContext>(GrGLCreateNativeInterface());
|
||||
|
||||
auto context =
|
||||
sk_sp<GrContext>(GrContext::Create(kOpenGL_GrBackend, backend_context));
|
||||
GrContextOptions options;
|
||||
options.fAvoidStencilBuffers = true;
|
||||
|
||||
auto context = sk_sp<GrContext>(
|
||||
GrContext::Create(kOpenGL_GrBackend, backend_context, options));
|
||||
|
||||
if (context == nullptr) {
|
||||
FXL_LOG(ERROR) << "Failed to setup Skia Gr context.";
|
||||
|
||||
Reference in New Issue
Block a user