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

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: Fix a typo that made tests fail. 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
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();
}
« content/renderer/gpu/render_widget_compositor.h ('K') | « ui/compositor/compositor.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698