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..4ce97164d42f5618803a06ea45908a5aa4d081f0 100644 |
--- a/content/public/browser/android/synchronous_compositor.h |
+++ b/content/public/browser/android/synchronous_compositor.h |
@@ -5,9 +5,11 @@ |
#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 "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" |
@@ -18,9 +20,13 @@ class CompositorFrame; |
class CompositorFrameAck; |
} |
+namespace cc_blink { |
+class ContextProviderWebContext; |
+} |
+ |
namespace gfx { |
class Transform; |
-}; |
+} |
namespace gpu { |
class GLInProcessContext; |
@@ -36,11 +42,26 @@ class WebContents; |
// kEnableSyncrhonousRendererCompositor flag is specified. |
class CONTENT_EXPORT SynchronousCompositor { |
public: |
+ struct 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); |
+ // The parameters are: |is_offscreen|, |attributes| and |
+ // |need_share_group_with_parent|. |
boliu
2015/02/17 16:50:43
Suggest putting the parameters next to the declara
tfarina
2015/02/17 16:58:18
Done.
|
+ typedef base::Callback< |
+ ContextHolder(bool, const blink::WebGraphicsContext3D::Attributes&, bool)> |
+ CreateContextCallback; |
+ static void SetCreateContextCallback(CreateContextCallback callback); |
+ |
static void SetGpuService( |
scoped_refptr<gpu::InProcessCommandBuffer::Service> service); |