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 1d03278d79b5d8b6a2e9454a7002a53f15afe0e7..607d15183cc5206af23b5fddb5c14300156b0a1e 100644 |
--- a/content/public/browser/android/synchronous_compositor.h |
+++ b/content/public/browser/android/synchronous_compositor.h |
@@ -13,6 +13,11 @@ |
class SkCanvas; |
+namespace cc { |
+class CompositorFrame; |
+class CompositorFrameAck; |
+} |
+ |
namespace gfx { |
class GLSurface; |
class Transform; |
@@ -20,9 +25,11 @@ class Transform; |
namespace content { |
+class SynchronousCompositorClient; |
class WebContents; |
-class SynchronousCompositorClient; |
+// TODO(boliu): Layering violation. |
+class SynchronousCompositorFactoryImpl; |
struct CONTENT_EXPORT SynchronousCompositorMemoryPolicy { |
// Memory limit for rendering and pre-rendering. |
@@ -47,6 +54,9 @@ class CONTENT_EXPORT SynchronousCompositor { |
static void SetClientForWebContents(WebContents* contents, |
SynchronousCompositorClient* client); |
+ // TODO(boliu): Layering violation. |
+ static SynchronousCompositorFactoryImpl* GetFactory(); |
+ |
// Allows changing or resetting the client to NULL (this must be used if |
// the client is being deleted prior to the DidDestroyCompositor() call |
// being received by the client). Ownership of |client| remains with |
@@ -71,16 +81,24 @@ class CONTENT_EXPORT SynchronousCompositor { |
// "On demand" hardware draw. The content is first clipped to |damage_area|, |
// then transformed through |transform|, and finally clipped to |view_size| |
// and by the existing stencil buffer if any. |
- virtual bool DemandDrawHw( |
- gfx::Size surface_size, |
- const gfx::Transform& transform, |
- gfx::Rect viewport, |
- gfx::Rect clip, |
- bool stencil_enabled) = 0; |
+ virtual bool DemandDrawHw(gfx::Size surface_size, |
+ const gfx::Transform& transform, |
+ gfx::Rect viewport, |
+ gfx::Rect clip, |
+ bool stencil_enabled, |
+ cc::CompositorFrame* frame) = 0; |
+ |
+ virtual bool DemandDrawDelegated(const gfx::Transform& transform, |
+ gfx::Rect viewport, |
+ gfx::Rect clip, |
+ cc::CompositorFrame* frame) = 0; |
// "On demand" SW draw, into the supplied canvas (observing the transform |
// and clip set there-in). |
- virtual bool DemandDrawSw(SkCanvas* canvas) = 0; |
+ virtual bool DemandDrawSw(SkCanvas* canvas, |
+ cc::CompositorFrame* frame) = 0; |
+ |
+ virtual void ReturnResources(const cc::CompositorFrameAck* frame_ack) = 0; |
// Set the memory limit policy of this compositor. |
virtual void SetMemoryPolicy( |