OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_ELEMENT_ANIMATIONS_H_ | 5 #ifndef CC_ANIMATION_ELEMENT_ANIMATIONS_H_ |
6 #define CC_ANIMATION_ELEMENT_ANIMATIONS_H_ | 6 #define CC_ANIMATION_ELEMENT_ANIMATIONS_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "base/observer_list.h" | 13 #include "base/observer_list.h" |
14 #include "base/time/time.h" | 14 #include "base/time/time.h" |
15 #include "cc/animation/animation.h" | 15 #include "cc/animation/animation.h" |
16 #include "cc/animation/animation_curve.h" | 16 #include "cc/animation/animation_curve.h" |
17 #include "cc/animation/animation_events.h" | 17 #include "cc/animation/animation_events.h" |
| 18 #include "cc/animation/property_animation_state.h" |
18 #include "cc/animation/target_property.h" | 19 #include "cc/animation/target_property.h" |
19 #include "cc/base/cc_export.h" | 20 #include "cc/base/cc_export.h" |
20 #include "ui/gfx/geometry/scroll_offset.h" | 21 #include "ui/gfx/geometry/scroll_offset.h" |
21 #include "ui/gfx/transform.h" | 22 #include "ui/gfx/transform.h" |
22 | 23 |
23 namespace gfx { | 24 namespace gfx { |
24 class BoxF; | 25 class BoxF; |
25 } | 26 } |
26 | 27 |
27 namespace cc { | 28 namespace cc { |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 | 242 |
242 base::TimeTicks last_tick_time_; | 243 base::TimeTicks last_tick_time_; |
243 | 244 |
244 bool has_element_in_active_list_; | 245 bool has_element_in_active_list_; |
245 bool has_element_in_pending_list_; | 246 bool has_element_in_pending_list_; |
246 | 247 |
247 bool scroll_offset_animation_was_interrupted_; | 248 bool scroll_offset_animation_was_interrupted_; |
248 | 249 |
249 bool needs_push_properties_; | 250 bool needs_push_properties_; |
250 | 251 |
251 struct PropertyAnimationState { | 252 PropertyAnimationState filter_animation_state_; |
252 bool currently_running_for_active_elements = false; | 253 PropertyAnimationState opacity_animation_state_; |
253 bool currently_running_for_pending_elements = false; | 254 PropertyAnimationState transform_animation_state_; |
254 bool potentially_animating_for_active_elements = false; | |
255 bool potentially_animating_for_pending_elements = false; | |
256 void Clear() { | |
257 currently_running_for_active_elements = false; | |
258 currently_running_for_pending_elements = false; | |
259 potentially_animating_for_active_elements = false; | |
260 potentially_animating_for_pending_elements = false; | |
261 } | |
262 }; | |
263 | |
264 struct PropertyAnimationState filter_animation_state_; | |
265 struct PropertyAnimationState opacity_animation_state_; | |
266 struct PropertyAnimationState transform_animation_state_; | |
267 | 255 |
268 bool needs_update_impl_client_state_transform_ : 1; | 256 bool needs_update_impl_client_state_transform_ : 1; |
269 bool needs_update_impl_client_state_opacity_ : 1; | 257 bool needs_update_impl_client_state_opacity_ : 1; |
270 bool needs_update_impl_client_state_filter_ : 1; | 258 bool needs_update_impl_client_state_filter_ : 1; |
271 | 259 |
272 DISALLOW_COPY_AND_ASSIGN(ElementAnimations); | 260 DISALLOW_COPY_AND_ASSIGN(ElementAnimations); |
273 }; | 261 }; |
274 | 262 |
275 } // namespace cc | 263 } // namespace cc |
276 | 264 |
277 #endif // CC_ANIMATION_ELEMENT_ANIMATIONS_H_ | 265 #endif // CC_ANIMATION_ELEMENT_ANIMATIONS_H_ |
OLD | NEW |