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

Unified Diff: android_webview/browser/aw_render_thread_context_provider.cc

Issue 1898033005: Use gpu::SharedMemoryLimits for in process GL contexts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move-limits
Patch Set: inproc-limits: rebase Created 4 years, 8 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
« no previous file with comments | « no previous file | blimp/client/feature/compositor/blimp_context_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)));
« no previous file with comments | « no previous file | blimp/client/feature/compositor/blimp_context_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698