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

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: comments 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..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).

Powered by Google App Engine
This is Rietveld 408576698