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

Unified Diff: content/public/browser/android/synchronous_compositor.h

Issue 920443003: Android: SetCreateContextCallback (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: reduce the diff Created 5 years, 9 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 | « content/public/browser/android/DEPS ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/android/synchronous_compositor.h
diff --git a/content/public/browser/android/synchronous_compositor.h b/content/public/browser/android/synchronous_compositor.h
index 476b86dce8310bb235402a50a67bab4137f8fca5..0ec5f97c1ac31ba2f44004d398ce9179b7834095 100644
--- a/content/public/browser/android/synchronous_compositor.h
+++ b/content/public/browser/android/synchronous_compositor.h
@@ -5,9 +5,12 @@
#ifndef CONTENT_PUBLIC_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_H_
#define CONTENT_PUBLIC_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_H_
+#include "base/callback.h"
#include "base/memory/ref_counted.h"
+#include "cc/blink/context_provider_web_context.h"
#include "content/common/content_export.h"
#include "gpu/command_buffer/service/in_process_command_buffer.h"
+#include "third_party/WebKit/public/platform/WebGraphicsContext3D.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/size.h"
@@ -20,10 +23,11 @@ class CompositorFrameAck;
namespace gfx {
class Transform;
-};
+}
namespace gpu {
class GLInProcessContext;
+struct GLInProcessContextSharedMemoryLimits;
}
namespace content {
@@ -36,13 +40,26 @@ class WebContents;
// kEnableSyncrhonousRendererCompositor flag is specified.
class CONTENT_EXPORT SynchronousCompositor {
public:
+ struct CONTENT_EXPORT ContextHolder {
+ ContextHolder();
+ ~ContextHolder();
+
+ scoped_refptr<cc_blink::ContextProviderWebContext> context_provider;
+ gpu::GLInProcessContext* context;
+ };
+
// Must be called once per WebContents instance. Will create the compositor
// instance as needed, but only if |client| is non-nullptr.
static void SetClientForWebContents(WebContents* contents,
SynchronousCompositorClient* client);
- static void SetGpuService(
- scoped_refptr<gpu::InProcessCommandBuffer::Service> service);
+ typedef base::Callback<ContextHolder(
+ bool /* need_share_group_with_parent */,
+ const blink::WebGraphicsContext3D::Attributes& /* attributes */,
+ bool /* is_offscreen */,
+ const gpu::GLInProcessContextSharedMemoryLimits& /* mem_limits */)>
+ CreateContextCallback;
+ static void SetCreateContextCallback(CreateContextCallback callback);
// By default, synchronous compopsitor records the full layer, not only
// what is inside and around the view port. This can be used to switch
« no previous file with comments | « content/public/browser/android/DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698