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

Side by Side Diff: third_party/WebKit/Source/core/animation/SampledEffect.h

Issue 2397113002: Move content up to KeyframeEffectReadOnly (Closed)
Patch Set: 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 SampledEffect_h 5 #ifndef SampledEffect_h
6 #define SampledEffect_h 6 #define SampledEffect_h
7 7
8 #include "core/animation/Animation.h" 8 #include "core/animation/Animation.h"
9 #include "core/animation/Interpolation.h" 9 #include "core/animation/Interpolation.h"
10 #include "core/animation/KeyframeEffect.h" 10 #include "core/animation/KeyframeEffectReadOnly.h"
11 #include "wtf/Allocator.h" 11 #include "wtf/Allocator.h"
12 #include "wtf/Vector.h" 12 #include "wtf/Vector.h"
13 13
14 namespace blink { 14 namespace blink {
15 15
16 class SVGElement; 16 class SVGElement;
17 17
18 // Associates the results of sampling an EffectModel with metadata used for 18 // Associates the results of sampling an EffectModel with metadata used for
19 // effect ordering and managing composited animations. 19 // effect ordering and managing composited animations.
20 class SampledEffect : public GarbageCollectedFinalized<SampledEffect> { 20 class SampledEffect : public GarbageCollectedFinalized<SampledEffect> {
21 WTF_MAKE_NONCOPYABLE(SampledEffect); 21 WTF_MAKE_NONCOPYABLE(SampledEffect);
22 22
23 public: 23 public:
24 static SampledEffect* create(KeyframeEffect* animation) { 24 static SampledEffect* create(KeyframeEffectReadOnly* animation) {
25 return new SampledEffect(animation); 25 return new SampledEffect(animation);
26 } 26 }
27 27
28 void clear(); 28 void clear();
29 29
30 const Vector<RefPtr<Interpolation>>& interpolations() const { 30 const Vector<RefPtr<Interpolation>>& interpolations() const {
31 return m_interpolations; 31 return m_interpolations;
32 } 32 }
33 Vector<RefPtr<Interpolation>>& mutableInterpolations() { 33 Vector<RefPtr<Interpolation>>& mutableInterpolations() {
34 return m_interpolations; 34 return m_interpolations;
35 } 35 }
36 36
37 KeyframeEffect* effect() const { return m_effect; } 37 KeyframeEffectReadOnly* effect() const { return m_effect; }
38 unsigned sequenceNumber() const { return m_sequenceNumber; } 38 unsigned sequenceNumber() const { return m_sequenceNumber; }
39 KeyframeEffectReadOnly::Priority priority() const { return m_priority; } 39 KeyframeEffectReadOnly::Priority priority() const { return m_priority; }
40 bool willNeverChange() const; 40 bool willNeverChange() const;
41 void removeReplacedInterpolations(const HashSet<PropertyHandle>&); 41 void removeReplacedInterpolations(const HashSet<PropertyHandle>&);
42 void updateReplacedProperties(HashSet<PropertyHandle>&); 42 void updateReplacedProperties(HashSet<PropertyHandle>&);
43 43
44 DECLARE_TRACE(); 44 DECLARE_TRACE();
45 45
46 private: 46 private:
47 SampledEffect(KeyframeEffect*); 47 SampledEffect(KeyframeEffectReadOnly*);
48 48
49 WeakMember<KeyframeEffect> m_effect; 49 WeakMember<KeyframeEffectReadOnly> m_effect;
50 Vector<RefPtr<Interpolation>> m_interpolations; 50 Vector<RefPtr<Interpolation>> m_interpolations;
51 const unsigned m_sequenceNumber; 51 const unsigned m_sequenceNumber;
52 KeyframeEffectReadOnly::Priority m_priority; 52 KeyframeEffectReadOnly::Priority m_priority;
53 }; 53 };
54 54
55 } // namespace blink 55 } // namespace blink
56 56
57 #endif // SampledEffect_h 57 #endif // SampledEffect_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698