Index: ui/compositor/compositor.cc |
diff --git a/ui/compositor/compositor.cc b/ui/compositor/compositor.cc |
index 7a1b2928a8890ac7d73b46511fa8191782788865..c62c12658474987e43abb35f9c9fa46c08549211 100644 |
--- a/ui/compositor/compositor.cc |
+++ b/ui/compositor/compositor.cc |
@@ -26,6 +26,7 @@ |
#include "ui/compositor/compositor_vsync_manager.h" |
#include "ui/compositor/dip_util.h" |
#include "ui/compositor/layer.h" |
+#include "ui/compositor/layer_animator_collection.h" |
#include "ui/gfx/frame_time.h" |
#include "ui/gl/gl_context.h" |
#include "ui/gl/gl_switches.h" |
@@ -257,7 +258,9 @@ void Compositor::Draw() { |
// TODO(nduca): Temporary while compositor calls |
// compositeImmediately() directly. |
Layout(); |
- host_->Composite(gfx::FrameTime::Now()); |
+ base::TimeTicks now = gfx::FrameTime::Now(); |
+ Animate(now); |
piman
2014/05/23 18:20:06
I'm not sure I understand what in the animation co
sadrul
2014/05/23 18:32:28
I am not sure if there is anything to ensure this
ajuma
2014/05/23 19:15:14
There doesn't seem to be anything to ensure this.
|
+ host_->Composite(now); |
} |
if (swap_state_ == SWAP_NONE) |
NotifyEnd(); |
@@ -317,6 +320,12 @@ bool Compositor::HasObserver(CompositorObserver* observer) { |
return observer_list_.HasObserver(observer); |
} |
+void Compositor::Animate(base::TimeTicks frame_begin_time) { |
+ LayerAnimatorCollection::GetInstance()->Progress(frame_begin_time); |
piman
2014/05/23 18:20:06
We have one compositor per root window, which are
sadrul
2014/05/23 18:32:28
Ah, good point. Right now, the LayerAnimator does
ajuma
2014/05/23 19:15:14
Maybe LayerAnimationDelegate::GetCollection(), whe
|
+ if (LayerAnimatorCollection::GetInstance()->HasActiveAnimators()) |
+ host_->SetNeedsAnimate(); |
+} |
+ |
void Compositor::Layout() { |
// We're sending damage that will be addressed during this composite |
// cycle, so we don't need to schedule another composite to address it. |