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..696534b5b534e944cbdbc09d9a6b4febe7593299 100644 |
--- a/content/public/browser/android/synchronous_compositor.h |
+++ b/content/public/browser/android/synchronous_compositor.h |
@@ -13,16 +13,24 @@ |
class SkCanvas; |
+namespace cc { |
+class CompositorFrame; |
+class CompositorFrameAck; |
+} |
+ |
namespace gfx { |
class GLSurface; |
class Transform; |
}; |
-namespace content { |
+namespace gpu { |
+class GLInProcessContext; |
+} |
-class WebContents; |
+namespace content { |
class SynchronousCompositorClient; |
+class WebContents; |
struct CONTENT_EXPORT SynchronousCompositorMemoryPolicy { |
// Memory limit for rendering and pre-rendering. |
@@ -68,15 +76,24 @@ class CONTENT_EXPORT SynchronousCompositor { |
// releases all hardware resources. |
virtual void ReleaseHwDraw() = 0; |
+ // Get the share context of the compositor. The returned context is owned |
+ // by the compositor and is only valid between InitializeHwDraw and |
+ // ReleaseHwDraw. |
+ virtual gpu::GLInProcessContext* GetShareContext() = 0; |
+ |
// "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; |
+ |
+ // For delegated rendering, return resources from parent compositor to this. |
+ // Note that all resources must be returned before ReleaseHwDraw. |
+ virtual void ReturnResources(const cc::CompositorFrameAck& frame_ack) = 0; |
// "On demand" SW draw, into the supplied canvas (observing the transform |
// and clip set there-in). |