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

Unified Diff: cc/animation/animation_events.h

Issue 1734063003: Share animations from compositor to main thread. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make NotifyAnimationTakeover pure virtual Created 4 years, 10 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: cc/animation/animation_events.h
diff --git a/cc/animation/animation_events.h b/cc/animation/animation_events.h
index 650b9b500c8d92ccc3c5398d23c10ffe5ed06bd5..73a705895d6ed1fa0d7934acd7d09b16bdeb9b05 100644
--- a/cc/animation/animation_events.h
+++ b/cc/animation/animation_events.h
@@ -7,7 +7,9 @@
#include <vector>
+#include "base/memory/scoped_ptr.h"
#include "cc/animation/animation.h"
+#include "cc/animation/animation_curve.h"
#include "cc/base/cc_export.h"
#include "cc/output/filter_operations.h"
#include "ui/gfx/transform.h"
@@ -15,14 +17,18 @@
namespace cc {
struct CC_EXPORT AnimationEvent {
- enum Type { STARTED, FINISHED, ABORTED, PROPERTY_UPDATE };
+ enum Type { STARTED, FINISHED, ABORTED, PROPERTY_UPDATE, TAKEOVER };
AnimationEvent(Type type,
int layer_id,
int group_id,
TargetProperty::Type target_property,
base::TimeTicks monotonic_time);
+
AnimationEvent(const AnimationEvent& other);
+ AnimationEvent& operator=(const AnimationEvent& other);
+
+ ~AnimationEvent();
Type type;
int layer_id;
@@ -33,6 +39,10 @@ struct CC_EXPORT AnimationEvent {
float opacity;
gfx::Transform transform;
FilterOperations filters;
+
+ // For continuing a scroll offset animation on the main thread.
+ double animation_start_time;
+ scoped_ptr<AnimationCurve> curve;
};
class CC_EXPORT AnimationEvents {

Powered by Google App Engine
This is Rietveld 408576698