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

Side by Side Diff: Source/core/platform/graphics/GraphicsLayerAnimation.h

Issue 14391005: Rename Animation -> PrimitiveAnimation (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 8 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
OLDNEW
1 /* 1 /*
2 Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies) 2 Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies)
3 3
4 This library is free software; you can redistribute it and/or 4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public 5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either 6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version. 7 version 2 of the License, or (at your option) any later version.
8 8
9 This library is distributed in the hope that it will be useful, 9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 22 matching lines...) Expand all
33 class Client { 33 class Client {
34 public: 34 public:
35 virtual void setAnimatedTransform(const TransformationMatrix&) = 0; 35 virtual void setAnimatedTransform(const TransformationMatrix&) = 0;
36 virtual void setAnimatedOpacity(float) = 0; 36 virtual void setAnimatedOpacity(float) = 0;
37 virtual void setAnimatedFilters(const FilterOperations&) = 0; 37 virtual void setAnimatedFilters(const FilterOperations&) = 0;
38 }; 38 };
39 39
40 GraphicsLayerAnimation() 40 GraphicsLayerAnimation()
41 : m_keyframes(AnimatedPropertyInvalid) 41 : m_keyframes(AnimatedPropertyInvalid)
42 { } 42 { }
43 GraphicsLayerAnimation(const String&, const KeyframeValueList&, const IntSiz e&, const Animation*, double, bool); 43 GraphicsLayerAnimation(const String&, const KeyframeValueList&, const IntSiz e&, const PrimitiveAnimation*, double, bool);
44 void apply(Client*); 44 void apply(Client*);
45 void pause(double); 45 void pause(double);
46 void resume(); 46 void resume();
47 double computeTotalRunningTime(); 47 double computeTotalRunningTime();
48 AnimationState state() const { return m_state; } 48 AnimationState state() const { return m_state; }
49 void setState(AnimationState s, double pauseTime = 0) 49 void setState(AnimationState s, double pauseTime = 0)
50 { 50 {
51 m_state = s; 51 m_state = s;
52 m_pauseTime = pauseTime; 52 m_pauseTime = pauseTime;
53 } 53 }
54 AnimatedPropertyID property() const { return m_keyframes.property(); } 54 AnimatedPropertyID property() const { return m_keyframes.property(); }
55 bool isActive() const; 55 bool isActive() const;
56 String name() const { return m_name; } 56 String name() const { return m_name; }
57 IntSize boxSize() const { return m_boxSize; } 57 IntSize boxSize() const { return m_boxSize; }
58 double startTime() const { return m_startTime; } 58 double startTime() const { return m_startTime; }
59 double pauseTime() const { return m_pauseTime; } 59 double pauseTime() const { return m_pauseTime; }
60 PassRefPtr<Animation> animation() const { return m_animation.get(); } 60 PassRefPtr<PrimitiveAnimation> animation() const { return m_animation.get(); }
61 const KeyframeValueList& keyframes() const { return m_keyframes; } 61 const KeyframeValueList& keyframes() const { return m_keyframes; }
62 bool listsMatch() const { return m_listsMatch; } 62 bool listsMatch() const { return m_listsMatch; }
63 63
64 private: 64 private:
65 void applyInternal(Client*, const AnimationValue* from, const AnimationValue * to, float progress); 65 void applyInternal(Client*, const AnimationValue* from, const AnimationValue * to, float progress);
66 KeyframeValueList m_keyframes; 66 KeyframeValueList m_keyframes;
67 IntSize m_boxSize; 67 IntSize m_boxSize;
68 RefPtr<Animation> m_animation; 68 RefPtr<PrimitiveAnimation> m_animation;
69 String m_name; 69 String m_name;
70 bool m_listsMatch; 70 bool m_listsMatch;
71 double m_startTime; 71 double m_startTime;
72 double m_pauseTime; 72 double m_pauseTime;
73 double m_totalRunningTime; 73 double m_totalRunningTime;
74 double m_lastRefreshedTime; 74 double m_lastRefreshedTime;
75 AnimationState m_state; 75 AnimationState m_state;
76 }; 76 };
77 77
78 class GraphicsLayerAnimations { 78 class GraphicsLayerAnimations {
(...skipping 17 matching lines...) Expand all
96 96
97 GraphicsLayerAnimations getActiveAnimations() const; 97 GraphicsLayerAnimations getActiveAnimations() const;
98 98
99 private: 99 private:
100 Vector<GraphicsLayerAnimation> m_animations; 100 Vector<GraphicsLayerAnimation> m_animations;
101 }; 101 };
102 102
103 } 103 }
104 104
105 #endif // GraphicsLayerAnimation_h 105 #endif // GraphicsLayerAnimation_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698