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

Side by Side Diff: ui/compositor/layer_animator.h

Issue 1778213003: UI Compositor: Fix threaded animation survival if layer removed and added. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2661
Patch Set: Created 4 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
« no previous file with comments | « no previous file | ui/compositor/layer_animator.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 UI_COMPOSITOR_LAYER_ANIMATOR_H_ 5 #ifndef UI_COMPOSITOR_LAYER_ANIMATOR_H_
6 #define UI_COMPOSITOR_LAYER_ANIMATOR_H_ 6 #define UI_COMPOSITOR_LAYER_ANIMATOR_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/gtest_prod_util.h" 12 #include "base/gtest_prod_util.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/memory/linked_ptr.h" 14 #include "base/memory/linked_ptr.h"
15 #include "base/memory/ref_counted.h" 15 #include "base/memory/ref_counted.h"
16 #include "base/observer_list.h" 16 #include "base/observer_list.h"
17 #include "base/time/time.h" 17 #include "base/time/time.h"
18 #include "cc/animation/layer_animation_event_observer.h" 18 #include "cc/animation/layer_animation_event_observer.h"
19 #include "ui/compositor/compositor_export.h" 19 #include "ui/compositor/compositor_export.h"
20 #include "ui/compositor/layer_animation_element.h" 20 #include "ui/compositor/layer_animation_element.h"
21 #include "ui/compositor/layer_threaded_animation_delegate.h" 21 #include "ui/compositor/layer_threaded_animation_delegate.h"
22 #include "ui/gfx/animation/tween.h" 22 #include "ui/gfx/animation/tween.h"
23 23
24 namespace cc { 24 namespace cc {
25 class Animation; 25 class Animation;
26 class AnimationPlayer; 26 class AnimationPlayer;
27 class AnimationTimeline; 27 class AnimationTimeline;
28 class Layer; 28 class Layer;
29 class LayerAnimationController;
29 } 30 }
30 31
31 namespace gfx { 32 namespace gfx {
32 class Animation; 33 class Animation;
33 class Rect; 34 class Rect;
34 class Transform; 35 class Transform;
35 } 36 }
36 37
37 namespace ui { 38 namespace ui {
38 class Compositor; 39 class Compositor;
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 bool disable_timer_for_test_; 385 bool disable_timer_for_test_;
385 386
386 // Prevents timer adjustments in case when we start multiple animations 387 // Prevents timer adjustments in case when we start multiple animations
387 // with preemption strategies that discard previous animations. 388 // with preemption strategies that discard previous animations.
388 bool adding_animations_; 389 bool adding_animations_;
389 390
390 // Observers are notified when layer animations end, are scheduled or are 391 // Observers are notified when layer animations end, are scheduled or are
391 // aborted. 392 // aborted.
392 base::ObserverList<LayerAnimationObserver> observers_; 393 base::ObserverList<LayerAnimationObserver> observers_;
393 394
395 // We store a state of LayerAnimationController here to save it in
396 // ResetCompositor/SetCompositor scope.
397 // TODO(loyso): Remove it. crbug.com/592873.
398 scoped_refptr<cc::LayerAnimationController> animation_controller_state_;
399
394 DISALLOW_COPY_AND_ASSIGN(LayerAnimator); 400 DISALLOW_COPY_AND_ASSIGN(LayerAnimator);
395 }; 401 };
396 402
397 } // namespace ui 403 } // namespace ui
398 404
399 #endif // UI_COMPOSITOR_LAYER_ANIMATOR_H_ 405 #endif // UI_COMPOSITOR_LAYER_ANIMATOR_H_
OLDNEW
« no previous file with comments | « no previous file | ui/compositor/layer_animator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698