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

Unified Diff: ui/compositor/compositor.cc

Issue 429743003: Rename Animate as Begin(Main)Frame (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Build fix. Created 6 years, 4 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/compositor.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/compositor.cc
diff --git a/ui/compositor/compositor.cc b/ui/compositor/compositor.cc
index fce83d6c2f69d139919ff06d0d272dff88ef2452..34dca9349e2db2f6a279a96d3ed3cfd18da0a650 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"
@@ -224,10 +225,13 @@ void Compositor::Draw() {
if (!IsLocked()) {
// TODO(nduca): Temporary while compositor calls
// compositeImmediately() directly.
- base::TimeTicks now = gfx::FrameTime::Now();
- Animate(now);
+ cc::BeginFrameArgs args =
+ cc::BeginFrameArgs::Create(gfx::FrameTime::Now(),
+ base::TimeTicks(),
+ cc::BeginFrameArgs::DefaultInterval());
+ BeginMainFrame(args);
Layout();
- host_->Composite(now);
+ host_->Composite(args.frame_time);
}
if (swap_state_ == SWAP_NONE)
NotifyEnd();
@@ -316,10 +320,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();
}
« no previous file with comments | « ui/compositor/compositor.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698