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

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

Issue 11830056: Enable accelerated animations for orphaned layers (Closed) Base URL: http://git.chromium.org/chromium/src.git@MakeLayerTreeHostAnimateLayersTakeWallClockTime
Patch Set: Fix nit Created 7 years, 11 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/layer_tree_host.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.h" 8 #include "cc/animation.h"
9 #include "cc/animation_curve.h" 9 #include "cc/animation_curve.h"
10 #include "cc/layer_animation_controller.h" 10 #include "cc/layer_animation_controller.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 class FakeLayerAnimationValueObserver : public cc::LayerAnimationValueObserver { 64 class FakeLayerAnimationValueObserver : public cc::LayerAnimationValueObserver {
65 public: 65 public:
66 FakeLayerAnimationValueObserver(); 66 FakeLayerAnimationValueObserver();
67 virtual ~FakeLayerAnimationValueObserver(); 67 virtual ~FakeLayerAnimationValueObserver();
68 68
69 // LayerAnimationValueObserver implementation 69 // LayerAnimationValueObserver implementation
70 virtual void OnOpacityAnimated(float) OVERRIDE; 70 virtual void OnOpacityAnimated(float) OVERRIDE;
71 virtual void OnTransformAnimated(const gfx::Transform&) OVERRIDE; 71 virtual void OnTransformAnimated(const gfx::Transform&) OVERRIDE;
72 virtual bool IsActive() const OVERRIDE; 72 virtual bool IsActive() const OVERRIDE;
73 virtual bool IsOrphaned() const OVERRIDE;
73 74
74 float opacity() const { return m_opacity; } 75 float opacity() const { return m_opacity; }
75 const gfx::Transform& transform() const { return m_transform; } 76 const gfx::Transform& transform() const { return m_transform; }
76 77
77 private: 78 private:
78 float m_opacity; 79 float m_opacity;
79 gfx::Transform m_transform; 80 gfx::Transform m_transform;
80 }; 81 };
81 82
82 int addOpacityTransitionToController(cc::LayerAnimationController&, double durat ion, float startOpacity, float endOpacity, bool useTimingFunction); 83 int addOpacityTransitionToController(cc::LayerAnimationController&, double durat ion, float startOpacity, float endOpacity, bool useTimingFunction);
83 int addAnimatedTransformToController(cc::LayerAnimationController&, double durat ion, int deltaX, int deltaY); 84 int addAnimatedTransformToController(cc::LayerAnimationController&, double durat ion, int deltaX, int deltaY);
84 85
85 int addOpacityTransitionToLayer(cc::Layer&, double duration, float startOpacity, float endOpacity, bool useTimingFunction); 86 int addOpacityTransitionToLayer(cc::Layer&, double duration, float startOpacity, float endOpacity, bool useTimingFunction);
86 int addOpacityTransitionToLayer(cc::LayerImpl&, double duration, float startOpac ity, float endOpacity, bool useTimingFunction); 87 int addOpacityTransitionToLayer(cc::LayerImpl&, double duration, float startOpac ity, float endOpacity, bool useTimingFunction);
87 88
88 int addAnimatedTransformToLayer(cc::Layer&, double duration, int deltaX, int del taY); 89 int addAnimatedTransformToLayer(cc::Layer&, double duration, int deltaX, int del taY);
89 int addAnimatedTransformToLayer(cc::LayerImpl&, double duration, int deltaX, int deltaY); 90 int addAnimatedTransformToLayer(cc::LayerImpl&, double duration, int deltaX, int deltaY);
90 91
91 } // namespace cc 92 } // namespace cc
92 93
93 #endif // CC_TEST_ANIMATION_TEST_COMMON_H_ 94 #endif // CC_TEST_ANIMATION_TEST_COMMON_H_
OLDNEW
« no previous file with comments | « cc/layer_tree_host.cc ('k') | cc/test/animation_test_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698