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

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

Issue 11108004: Android Browser Compositor: Add ScheduleComposite() callback. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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/compositor.h
diff --git a/content/public/browser/android/compositor.h b/content/public/browser/android/compositor.h
index 9019e4776ba3d7ba56a878e41ea89d858398962a..9f158cf2ab210ecd0e66b504cfc46ab74a1cd6c5 100644
--- a/content/public/browser/android/compositor.h
+++ b/content/public/browser/android/compositor.h
@@ -19,6 +19,12 @@ namespace content {
// An interface to the browser-side compositor.
class Compositor {
public:
+ class Client {
+ public:
+ // Tells the client that it should schedule a composite.
+ virtual void ScheduleComposite() = 0;
+ };
+
virtual ~Compositor() {}
// Performs the global initialization needed before any compositor
@@ -26,7 +32,7 @@ class Compositor {
static void Initialize();
// Creates and returns a compositor instance.
- static Compositor* Create();
+ static Compositor* Create(Client* client);
// Attaches the layer tree.
virtual void SetRootLayer(WebKit::WebLayer* root) = 0;
@@ -42,11 +48,8 @@ class Compositor {
// The buffer is not modified if false is returned.
virtual bool CompositeAndReadback(void *pixels, const gfx::Rect& rect) = 0;
- // Callback to be run after the frame has been drawn. It passes back
- // a synchronization point identifier.
- typedef base::Callback<void(uint32)> SurfacePresentedCallback;
-
- virtual void OnSurfaceUpdated(const SurfacePresentedCallback& callback) = 0;
+ // Composite immediately. Used in single-threaded mode.
+ virtual void Composite() = 0;
protected:
Compositor() {}

Powered by Google App Engine
This is Rietveld 408576698