Chromium Code Reviews| Index: ui/compositor/compositor.cc |
| diff --git a/ui/compositor/compositor.cc b/ui/compositor/compositor.cc |
| index 43a88a6717c3fe1237ef8c6d5d44aa66011c0407..ade1edff55cd6b9fca114117fd30ca351883a98b 100644 |
| --- a/ui/compositor/compositor.cc |
| +++ b/ui/compositor/compositor.cc |
| @@ -18,6 +18,7 @@ |
| #include "cc/base/switches.h" |
| #include "cc/input/input_handler.h" |
| #include "cc/layers/layer.h" |
| +#include "cc/output/begin_frame_args.h" |
| #include "cc/output/context_provider.h" |
| #include "cc/trees/layer_tree_host.h" |
| #include "third_party/skia/include/core/SkBitmap.h" |
| @@ -227,7 +228,9 @@ void Compositor::Draw() { |
| // TODO(nduca): Temporary while compositor calls |
| // compositeImmediately() directly. |
| base::TimeTicks now = gfx::FrameTime::Now(); |
| - Animate(now); |
| + cc::BeginFrameArgs args = cc::BeginFrameArgs::Create( |
| + now, base::TimeTicks(), cc::BeginFrameArgs::DefaultInterval()); |
| + BeginMainFrame(args); |
| Layout(); |
| host_->Composite(now); |
|
mithro-old
2014/08/11 07:33:34
Maybe
cc::BeginFrameArgs args = cc::BeginFrameAr
Sami
2014/08/11 17:51:27
Good idea, done.
|
| } |
| @@ -303,10 +306,10 @@ bool Compositor::HasAnimationObserver(CompositorAnimationObserver* observer) { |
| return animation_observer_list_.HasObserver(observer); |
| } |
| -void Compositor::Animate(base::TimeTicks frame_begin_time) { |
| +void Compositor::BeginMainFrame(const cc::BeginFrameArgs& args) { |
| FOR_EACH_OBSERVER(CompositorAnimationObserver, |
| animation_observer_list_, |
| - OnAnimationStep(frame_begin_time)); |
| + OnAnimationStep(args.frame_time)); |
| if (animation_observer_list_.might_have_observers()) |
| host_->SetNeedsAnimate(); |
| } |