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

Unified Diff: cc/input/page_scale_animation.h

Issue 754433003: Update from https://crrev.com/305340 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 | « cc/debug/rasterize_and_record_benchmark_impl.cc ('k') | cc/layers/picture_layer_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/input/page_scale_animation.h
diff --git a/cc/input/page_scale_animation.h b/cc/input/page_scale_animation.h
index ce13dcf8ba7ca650f28b7d370f3be5c6d44203b1..0e430c212fe805854be09c049170934999e8ab1c 100644
--- a/cc/input/page_scale_animation.h
+++ b/cc/input/page_scale_animation.h
@@ -10,12 +10,31 @@
#include "base/time/time.h"
#include "cc/base/cc_export.h"
#include "ui/gfx/geometry/size.h"
+#include "ui/gfx/geometry/vector2d.h"
#include "ui/gfx/geometry/vector2d_f.h"
namespace cc {
class TimingFunction;
+// Used in the CC to pass around a scale animation that hasn't yet been
+// initialized.
+struct PendingPageScaleAnimation {
+ PendingPageScaleAnimation(
+ const gfx::Vector2d _target_offset,
+ bool _use_anchor,
+ float _scale,
+ const base::TimeDelta& _duration)
+ : target_offset(_target_offset),
+ use_anchor(_use_anchor),
+ scale(_scale),
+ duration(_duration) {}
+ gfx::Vector2d target_offset;
+ bool use_anchor;
+ float scale;
+ base::TimeDelta duration;
+};
+
// A small helper class that does the math for zoom animations, primarily for
// double-tap zoom. Initialize it with starting and ending scroll/page scale
// positions and an animation length time, then call ...AtTime() at every frame
« no previous file with comments | « cc/debug/rasterize_and_record_benchmark_impl.cc ('k') | cc/layers/picture_layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698