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

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

Issue 287993004: [Android WebView] Implement Ubercomp for Render Thread support (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: init tear down factored out separately Created 6 years, 7 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
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..5cd659f662e13ad1da9074e9bc81c265c3205ada 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,16 +76,25 @@ 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(
+ virtual scoped_ptr<cc::CompositorFrame> DemandDrawHw(
gfx::Size surface_size,
const gfx::Transform& transform,
gfx::Rect viewport,
gfx::Rect clip,
bool stencil_enabled) = 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).
virtual bool DemandDrawSw(SkCanvas* canvas) = 0;

Powered by Google App Engine
This is Rietveld 408576698