summaryrefslogtreecommitdiffstats
path: root/android_webview/lib/main
diff options
context:
space:
mode:
authorreveman@chromium.org <reveman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-28 20:09:13 +0000
committerreveman@chromium.org <reveman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-28 20:09:13 +0000
commitb80a63b9a9741456017473d72c4038cd474c03dc (patch)
treea194fd757510c213e8003adc71b4533baa70153a /android_webview/lib/main
parent5668158d62f661d76b7672d997cd444d5ea419c5 (diff)
downloadchromium_src-b80a63b9a9741456017473d72c4038cd474c03dc.zip
chromium_src-b80a63b9a9741456017473d72c4038cd474c03dc.tar.gz
chromium_src-b80a63b9a9741456017473d72c4038cd474c03dc.tar.bz2
gpu: Add GpuMemoryBufferFactory interface.
Used for in-process GpuMemoryBuffer creation. TEST=gpu_unittests --gtest_filter=MockGpuMemoryBufferTest.Lifecycle BUG=261649 NOTRY=true Review URL: https://chromiumcodereview.appspot.com/20658002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@214136 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'android_webview/lib/main')
-rw-r--r--android_webview/lib/main/aw_main_delegate.cc6
-rw-r--r--android_webview/lib/main/aw_main_delegate.h2
2 files changed, 7 insertions, 1 deletions
diff --git a/android_webview/lib/main/aw_main_delegate.cc b/android_webview/lib/main/aw_main_delegate.cc
index aeef23c..4c94d1f 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);
diff --git a/android_webview/lib/main/aw_main_delegate.h b/android_webview/lib/main/aw_main_delegate.h
index 81ebccf..fbf3a73 100644
--- a/android_webview/lib/main/aw_main_delegate.h
+++ b/android_webview/lib/main/aw_main_delegate.h
@@ -18,6 +18,7 @@ namespace android_webview {
class AwContentBrowserClient;
class AwContentRendererClient;
+class GpuMemoryBufferFactoryImpl;
// Android WebView implementation of ContentMainDelegate.
class AwMainDelegate : public content::ContentMainDelegate,
@@ -51,6 +52,7 @@ class AwMainDelegate : public content::ContentMainDelegate,
AwContentClient content_client_;
scoped_ptr<AwContentBrowserClient> content_browser_client_;
scoped_ptr<AwContentRendererClient> content_renderer_client_;
+ scoped_ptr<GpuMemoryBufferFactoryImpl> gpu_memory_buffer_factory_;
DISALLOW_COPY_AND_ASSIGN(AwMainDelegate);
};