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

Unified Diff: android_webview/browser/deferred_gpu_command_service.cc

Issue 920443003: Android: SetCreateContextCallback (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: base::Bind Created 5 years, 10 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 | content/browser/android/in_process/synchronous_compositor_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/browser/deferred_gpu_command_service.cc
diff --git a/android_webview/browser/deferred_gpu_command_service.cc b/android_webview/browser/deferred_gpu_command_service.cc
index 0bcb3afdcc3147d7d43f263160a4c435947b854d..c9fd4a86f7b3b064d9e70cd76874f7bb947309e0 100644
--- a/android_webview/browser/deferred_gpu_command_service.cc
+++ b/android_webview/browser/deferred_gpu_command_service.cc
@@ -6,6 +6,7 @@
#include "android_webview/browser/gl_view_renderer_manager.h"
#include "android_webview/browser/shared_renderer_state.h"
+#include "base/bind.h"
#include "base/lazy_instance.h"
#include "base/synchronization/lock.h"
#include "base/trace_event/trace_event.h"
@@ -15,8 +16,18 @@
namespace android_webview {
namespace {
+
base::LazyInstance<scoped_refptr<DeferredGpuCommandService> >
g_service = LAZY_INSTANCE_INITIALIZER;
+
+content::SynchronousCompositor::ContextHolder GetContextHolder(
+ bool need_share_group_with_parent,
+ const blink::WebGraphicsContext3D::Attributes& attributes,
+ bool is_offscreen) {
+ content::SynchronousCompositor::ContextHolder holder;
+ return holder;
tfarina 2015/02/21 16:39:08 What I should put here?
boliu 2015/02/23 21:33:07 The this callback is replacing the CreateOffscreen
tfarina 2015/02/24 17:02:34 Done.
+}
+
} // namespace
base::LazyInstance<base::ThreadLocalBoolean> ScopedAllowGL::allow_gl;
@@ -50,7 +61,8 @@ ScopedAllowGL::~ScopedAllowGL() {
void DeferredGpuCommandService::SetInstance() {
if (!g_service.Get().get()) {
g_service.Get() = new DeferredGpuCommandService;
- content::SynchronousCompositor::SetGpuService(g_service.Get());
+ content::SynchronousCompositor::SetCreateContextCallback(
+ base::Bind(&GetContextHolder));
}
}
« no previous file with comments | « no previous file | content/browser/android/in_process/synchronous_compositor_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698