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

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

Issue 266353003: aw: Ubercomp mega patch (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_android.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_android.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698