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

Unified Diff: mojo/examples/compositor_app/compositor_host.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 | « mojo/examples/compositor_app/compositor_host.h ('k') | ui/compositor/compositor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/examples/compositor_app/compositor_host.cc
diff --git a/mojo/examples/compositor_app/compositor_host.cc b/mojo/examples/compositor_app/compositor_host.cc
index 1c47cdb59caa7b6e124d1d6a10170011733c6f35..0cc1aea0bba5c5658d1266c2c1082fdbdd01c4c7 100644
--- a/mojo/examples/compositor_app/compositor_host.cc
+++ b/mojo/examples/compositor_app/compositor_host.cc
@@ -6,6 +6,7 @@
#include "cc/layers/layer.h"
#include "cc/layers/solid_color_layer.h"
+#include "cc/output/begin_frame_args.h"
#include "cc/output/context_provider.h"
#include "cc/output/output_surface.h"
#include "cc/trees/layer_tree_host.h"
@@ -58,10 +59,10 @@ void CompositorHost::SetupScene() {
void CompositorHost::WillBeginMainFrame(int frame_id) {}
void CompositorHost::DidBeginMainFrame() {}
-void CompositorHost::Animate(base::TimeTicks frame_begin_time) {
+void CompositorHost::BeginMainFrame(const cc::BeginFrameArgs& args) {
// TODO(jamesr): Should use cc's animation system.
static const double kDegreesPerSecond = 70.0;
- double time_in_seconds = (frame_begin_time - base::TimeTicks()).InSecondsF();
+ double time_in_seconds = (args.frame_time - base::TimeTicks()).InSecondsF();
double child_rotation_degrees = kDegreesPerSecond * time_in_seconds;
gfx::Transform child_transform;
child_transform.Translate(200, 200);
« no previous file with comments | « mojo/examples/compositor_app/compositor_host.h ('k') | ui/compositor/compositor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698