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

Unified Diff: cc/layer_animation_controller.cc

Issue 11830056: Enable accelerated animations for orphaned layers (Closed) Base URL: http://git.chromium.org/chromium/src.git@MakeLayerTreeHostAnimateLayersTakeWallClockTime
Patch Set: Created 7 years, 11 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 | « cc/layer_animation_controller.h ('k') | cc/layer_animation_value_observer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layer_animation_controller.cc
diff --git a/cc/layer_animation_controller.cc b/cc/layer_animation_controller.cc
index d5ed278bc57932638f4de36a9a67dc26f2399e3f..21b15a63f45151ad17ae0e7b8190a614a2d1cc89 100644
--- a/cc/layer_animation_controller.cc
+++ b/cc/layer_animation_controller.cc
@@ -231,6 +231,18 @@ void LayerAnimationController::removeObserver(LayerAnimationValueObserver* obser
m_observers.RemoveObserver(observer);
}
+bool LayerAnimationController::hasNonOrphanedObserver()
+{
+ if (m_observers.might_have_observers()) {
+ ObserverListBase<LayerAnimationValueObserver>::Iterator it(m_observers);
+ LayerAnimationValueObserver* obs;
+ while ((obs = it.GetNext()) != NULL)
jamesr 2013/01/14 21:57:27 use braces since the block is more than 1 line
ajuma 2013/01/15 16:18:42 Done.
+ if (!obs->IsOrphaned())
+ return true;
+ }
+ return false;
+}
+
void LayerAnimationController::pushNewAnimationsToImplThread(LayerAnimationController* controllerImpl) const
{
// Any new animations owned by the main thread's controller are cloned and adde to the impl thread's controller.
« no previous file with comments | « cc/layer_animation_controller.h ('k') | cc/layer_animation_value_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698