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

Side by Side Diff: cc/animation/element_animations.h

Issue 2349643003: CC Animation: Extract PropertyAnimationState as a non-nested struct. (Closed)
Patch Set: Reparent to master to make it independent. Created 4 years, 2 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
« no previous file with comments | « cc/animation/animation_player.cc ('k') | cc/animation/element_animations.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 240
240 base::TimeTicks last_tick_time_; 241 base::TimeTicks last_tick_time_;
241 242
242 bool has_element_in_active_list_; 243 bool has_element_in_active_list_;
243 bool has_element_in_pending_list_; 244 bool has_element_in_pending_list_;
244 245
245 bool scroll_offset_animation_was_interrupted_; 246 bool scroll_offset_animation_was_interrupted_;
246 247
247 bool needs_push_properties_; 248 bool needs_push_properties_;
248 249
249 struct PropertyAnimationState { 250 PropertyAnimationState filter_animation_state_;
250 bool currently_running_for_active_elements = false; 251 PropertyAnimationState opacity_animation_state_;
251 bool currently_running_for_pending_elements = false; 252 PropertyAnimationState transform_animation_state_;
252 bool potentially_animating_for_active_elements = false;
253 bool potentially_animating_for_pending_elements = false;
254 void Clear() {
255 currently_running_for_active_elements = false;
256 currently_running_for_pending_elements = false;
257 potentially_animating_for_active_elements = false;
258 potentially_animating_for_pending_elements = false;
259 }
260 };
261
262 struct PropertyAnimationState filter_animation_state_;
263 struct PropertyAnimationState opacity_animation_state_;
264 struct PropertyAnimationState transform_animation_state_;
265 253
266 bool needs_update_impl_client_state_transform_ : 1; 254 bool needs_update_impl_client_state_transform_ : 1;
267 bool needs_update_impl_client_state_opacity_ : 1; 255 bool needs_update_impl_client_state_opacity_ : 1;
268 bool needs_update_impl_client_state_filter_ : 1; 256 bool needs_update_impl_client_state_filter_ : 1;
269 257
270 DISALLOW_COPY_AND_ASSIGN(ElementAnimations); 258 DISALLOW_COPY_AND_ASSIGN(ElementAnimations);
271 }; 259 };
272 260
273 } // namespace cc 261 } // namespace cc
274 262
275 #endif // CC_ANIMATION_ELEMENT_ANIMATIONS_H_ 263 #endif // CC_ANIMATION_ELEMENT_ANIMATIONS_H_
OLDNEW
« no previous file with comments | « cc/animation/animation_player.cc ('k') | cc/animation/element_animations.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698