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

Unified Diff: android_webview/lib/main/aw_main_delegate.cc

Issue 20017005: gpu: Refactor GpuMemoryBuffer framework for multi-process support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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: android_webview/lib/main/aw_main_delegate.cc
diff --git a/android_webview/lib/main/aw_main_delegate.cc b/android_webview/lib/main/aw_main_delegate.cc
index aeef23c75e22b80f8c3061cbd682abe4126e40bf..4c94d1feaf17a78087a0ea62de6f2b061851e288 100644
--- a/android_webview/lib/main/aw_main_delegate.cc
+++ b/android_webview/lib/main/aw_main_delegate.cc
@@ -5,6 +5,7 @@
#include "android_webview/lib/main/aw_main_delegate.h"
#include "android_webview/browser/aw_content_browser_client.h"
+#include "android_webview/browser/gpu_memory_buffer_factory_impl.h"
#include "android_webview/browser/scoped_allow_wait_for_legacy_web_view_api.h"
#include "android_webview/lib/aw_browser_dependency_factory_impl.h"
#include "android_webview/native/aw_geolocation_permission_context.h"
@@ -34,7 +35,8 @@ base::LazyInstance<scoped_ptr<ScopedAllowWaitForLegacyWebViewApi> >
}
-AwMainDelegate::AwMainDelegate() {
+AwMainDelegate::AwMainDelegate()
+ : gpu_memory_buffer_factory_(new GpuMemoryBufferFactoryImpl) {
}
AwMainDelegate::~AwMainDelegate() {
@@ -44,6 +46,8 @@ bool AwMainDelegate::BasicStartupComplete(int* exit_code) {
content::SetContentClient(&content_client_);
gpu::GLInProcessContext::EnableVirtualizedContext();
+ gpu::GLInProcessContext::SetGpuMemoryBufferFactory(
+ gpu_memory_buffer_factory_.get());
CommandLine* cl = CommandLine::ForCurrentProcess();
cl->AppendSwitch(switches::kEnableBeginFrameScheduling);

Powered by Google App Engine
This is Rietveld 408576698