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

Unified Diff: ui/compositor/compositor.h

Issue 427103002: compositor: Add rAF-like functionality for the UI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 5 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 | « ui/compositor/BUILD.gn ('k') | ui/compositor/compositor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/compositor.h
diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h
index a10b62fcedfafd99b2c31256eafb6dfab46586ee..0e4ac8a0a27e261c3955f368f8a09976029c3193 100644
--- a/ui/compositor/compositor.h
+++ b/ui/compositor/compositor.h
@@ -16,6 +16,7 @@
#include "cc/trees/layer_tree_host_client.h"
#include "cc/trees/layer_tree_host_single_thread_client.h"
#include "third_party/skia/include/core/SkColor.h"
+#include "ui/compositor/compositor_animation_observer.h"
#include "ui/compositor/compositor_export.h"
#include "ui/compositor/compositor_observer.h"
#include "ui/compositor/layer_animator_collection.h"
@@ -128,8 +129,7 @@ class COMPOSITOR_EXPORT CompositorLock
// view hierarchy.
class COMPOSITOR_EXPORT Compositor
: NON_EXPORTED_BASE(public cc::LayerTreeHostClient),
- NON_EXPORTED_BASE(public cc::LayerTreeHostSingleThreadClient),
- NON_EXPORTED_BASE(public LayerAnimatorCollectionDelegate) {
+ NON_EXPORTED_BASE(public cc::LayerTreeHostSingleThreadClient) {
public:
Compositor(gfx::AcceleratedWidget widget,
ui::ContextFactory* context_factory,
@@ -198,6 +198,10 @@ class COMPOSITOR_EXPORT Compositor
void RemoveObserver(CompositorObserver* observer);
bool HasObserver(CompositorObserver* observer);
+ void AddAnimationObserver(CompositorAnimationObserver* observer);
+ void RemoveAnimationObserver(CompositorAnimationObserver* observer);
+ bool HasAnimationObserver(CompositorAnimationObserver* observer);
+
// Creates a compositor lock. Returns NULL if it is not possible to lock at
// this time (i.e. we're waiting to complete a previous unlock).
scoped_refptr<CompositorLock> GetCompositorLock();
@@ -235,9 +239,6 @@ class COMPOSITOR_EXPORT Compositor
virtual void DidPostSwapBuffers() OVERRIDE;
virtual void DidAbortSwapBuffers() OVERRIDE;
- // LayerAnimatorCollectionDelegate implementation.
- virtual void ScheduleAnimationForLayerCollection() OVERRIDE;
-
int last_started_frame() { return last_started_frame_; }
int last_ended_frame() { return last_ended_frame_; }
@@ -271,6 +272,7 @@ class COMPOSITOR_EXPORT Compositor
Layer* root_layer_;
ObserverList<CompositorObserver> observer_list_;
+ ObserverList<CompositorAnimationObserver> animation_observer_list_;
gfx::AcceleratedWidget widget_;
scoped_refptr<cc::Layer> root_web_layer_;
« no previous file with comments | « ui/compositor/BUILD.gn ('k') | ui/compositor/compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698