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

Side by Side Diff: cc/test/animation_test_common.h

Issue 60083018: Don't PushProperties every commit for animating layers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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
« no previous file with comments | « cc/layers/layer_impl.cc ('k') | cc/test/animation_test_common.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 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_TEST_ANIMATION_TEST_COMMON_H_ 5 #ifndef CC_TEST_ANIMATION_TEST_COMMON_H_
6 #define CC_TEST_ANIMATION_TEST_COMMON_H_ 6 #define CC_TEST_ANIMATION_TEST_COMMON_H_
7 7
8 #include "cc/animation/animation.h" 8 #include "cc/animation/animation.h"
9 #include "cc/animation/animation_curve.h" 9 #include "cc/animation/animation_curve.h"
10 #include "cc/animation/layer_animation_controller.h" 10 #include "cc/animation/layer_animation_controller.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 66
67 class FakeLayerAnimationValueObserver : public LayerAnimationValueObserver { 67 class FakeLayerAnimationValueObserver : public LayerAnimationValueObserver {
68 public: 68 public:
69 FakeLayerAnimationValueObserver(); 69 FakeLayerAnimationValueObserver();
70 virtual ~FakeLayerAnimationValueObserver(); 70 virtual ~FakeLayerAnimationValueObserver();
71 71
72 // LayerAnimationValueObserver implementation 72 // LayerAnimationValueObserver implementation
73 virtual void OnFilterAnimated(const FilterOperations& filters) OVERRIDE; 73 virtual void OnFilterAnimated(const FilterOperations& filters) OVERRIDE;
74 virtual void OnOpacityAnimated(float opacity) OVERRIDE; 74 virtual void OnOpacityAnimated(float opacity) OVERRIDE;
75 virtual void OnTransformAnimated(const gfx::Transform& transform) OVERRIDE; 75 virtual void OnTransformAnimated(const gfx::Transform& transform) OVERRIDE;
76 virtual void OnAnimationWaitingForDeletion() OVERRIDE;
76 virtual bool IsActive() const OVERRIDE; 77 virtual bool IsActive() const OVERRIDE;
77 78
78 const FilterOperations& filters() const { return filters_; } 79 const FilterOperations& filters() const { return filters_; }
79 float opacity() const { return opacity_; } 80 float opacity() const { return opacity_; }
80 const gfx::Transform& transform() const { return transform_; } 81 const gfx::Transform& transform() const { return transform_; }
81 82
83 bool animation_waiting_for_deletion() {
84 return animation_waiting_for_deletion_;
85 }
86
82 private: 87 private:
83 FilterOperations filters_; 88 FilterOperations filters_;
84 float opacity_; 89 float opacity_;
85 gfx::Transform transform_; 90 gfx::Transform transform_;
91 bool animation_waiting_for_deletion_;
86 }; 92 };
87 93
88 class FakeInactiveLayerAnimationValueObserver 94 class FakeInactiveLayerAnimationValueObserver
89 : public FakeLayerAnimationValueObserver { 95 : public FakeLayerAnimationValueObserver {
90 public: 96 public:
91 virtual bool IsActive() const OVERRIDE; 97 virtual bool IsActive() const OVERRIDE;
92 }; 98 };
93 99
94 int AddOpacityTransitionToController(LayerAnimationController* controller, 100 int AddOpacityTransitionToController(LayerAnimationController* controller,
95 double duration, 101 double duration,
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 float end_brightness); 141 float end_brightness);
136 142
137 int AddAnimatedFilterToLayer(LayerImpl* layer, 143 int AddAnimatedFilterToLayer(LayerImpl* layer,
138 double duration, 144 double duration,
139 float start_brightness, 145 float start_brightness,
140 float end_brightness); 146 float end_brightness);
141 147
142 } // namespace cc 148 } // namespace cc
143 149
144 #endif // CC_TEST_ANIMATION_TEST_COMMON_H_ 150 #endif // CC_TEST_ANIMATION_TEST_COMMON_H_
OLDNEW
« no previous file with comments | « cc/layers/layer_impl.cc ('k') | cc/test/animation_test_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698