Chromium Code Reviews| Index: android_webview/browser/aw_render_thread_context_provider.cc |
| diff --git a/android_webview/browser/aw_render_thread_context_provider.cc b/android_webview/browser/aw_render_thread_context_provider.cc |
| index 93251fa6604a923d66b63f99a0db2a4858fd6abc..750e9ba3a5e8cdc7e5237bff40259a19637380e5 100644 |
| --- a/android_webview/browser/aw_render_thread_context_provider.cc |
| +++ b/android_webview/browser/aw_render_thread_context_provider.cc |
| @@ -13,6 +13,7 @@ |
| #include "gpu/command_buffer/client/gl_in_process_context.h" |
| #include "gpu/command_buffer/client/gles2_implementation.h" |
| #include "gpu/command_buffer/client/gles2_lib.h" |
| +#include "gpu/command_buffer/client/shared_memory_limits.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" |
| @@ -50,11 +51,15 @@ AwRenderThreadContextProvider::AwRenderThreadContextProvider( |
| attributes.samples = 0; |
| attributes.sample_buffers = 0; |
| attributes.bind_generates_resource = false; |
| + |
| + gpu::SharedMemoryLimits limits; |
| + // TODO(boliu): Why? |
| + limits.start_transfer_buffer_size = 4 * 1024 * 1024; |
|
danakj
2016/04/20 02:13:53
I took this from the old defaults which were diffe
boliu
2016/04/20 02:39:23
This only runs the delegated compositor, which is
danakj
2016/04/20 21:55:02
Stealing from compositor_impl_android then.
|
| + |
| context_.reset(gpu::GLInProcessContext::Create( |
| service, surface, surface->IsOffscreen(), gfx::kNullAcceleratedWidget, |
| surface->GetSize(), nullptr /* share_context */, attributes, |
| - gfx::PreferDiscreteGpu, gpu::GLInProcessContextSharedMemoryLimits(), |
| - nullptr, nullptr)); |
| + gfx::PreferDiscreteGpu, limits, nullptr, nullptr)); |
| context_->GetImplementation()->SetLostContextCallback(base::Bind( |
| &AwRenderThreadContextProvider::OnLostContext, base::Unretained(this))); |