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

Side by Side Diff: cc/animation_events.h

Issue 12453010: Allow impl-only animations, and return opacity values via AnimationEvents. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_ANIMATION_EVENTS_H_ 5 #ifndef CC_ANIMATION_EVENTS_H_
6 #define CC_ANIMATION_EVENTS_H_ 6 #define CC_ANIMATION_EVENTS_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "cc/animation.h" 10 #include "cc/animation.h"
11 11
12 namespace cc { 12 namespace cc {
13 13
14 struct AnimationEvent { 14 struct AnimationEvent {
15 enum Type { Started, Finished }; 15 enum Type { Started, Finished, PropertyUpdate };
16 16
17 AnimationEvent(Type type, int layerId, int groupId, Animation::TargetPropert y targetProperty, double monotonicTime) 17 AnimationEvent(Type type, int layerId, int groupId, Animation::TargetPropert y targetProperty, double monotonicTime, float val = 0)
18 : type(type) 18 : type(type)
19 , layerId(layerId) 19 , layerId(layerId)
20 , groupId(groupId) 20 , groupId(groupId)
21 , targetProperty(targetProperty) 21 , targetProperty(targetProperty)
22 , monotonicTime(monotonicTime) 22 , monotonicTime(monotonicTime)
23 , value(val)
Ian Vollick 2013/03/06 01:00:57 nit: Since I'd like to support plumbing back trans
wjmaclean 2013/03/06 17:03:13 Done.
23 { 24 {
24 } 25 }
25 26
26 Type type; 27 Type type;
27 int layerId; 28 int layerId;
28 int groupId; 29 int groupId;
29 Animation::TargetProperty targetProperty; 30 Animation::TargetProperty targetProperty;
30 double monotonicTime; 31 double monotonicTime;
32 float value;
Ian Vollick 2013/03/06 01:00:57 I know that you're only interested in floats at th
wjmaclean 2013/03/06 17:03:13 Done.
31 }; 33 };
32 34
33 typedef std::vector<AnimationEvent> AnimationEventsVector; 35 typedef std::vector<AnimationEvent> AnimationEventsVector;
34 36
35 } // namespace cc 37 } // namespace cc
36 38
37 #endif // CC_ANIMATION_EVENTS_H_ 39 #endif // CC_ANIMATION_EVENTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698