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

Side by Side Diff: Source/core/animation/SampledEffect.cpp

Issue 1113173003: Web Animations: Update naming to reflect spec changes (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: No, really. Created 5 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/animation/SampledEffect.h ('k') | Source/core/animation/StringKeyframe.h » ('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 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 #include "config.h" 5 #include "config.h"
6 #include "core/animation/SampledEffect.h" 6 #include "core/animation/SampledEffect.h"
7 7
8 #include "core/animation/SVGInterpolation.h" 8 #include "core/animation/SVGInterpolation.h"
9 #include "core/animation/StyleInterpolation.h" 9 #include "core/animation/StyleInterpolation.h"
10 #include "core/svg/SVGElement.h" 10 #include "core/svg/SVGElement.h"
11 11
12 namespace blink { 12 namespace blink {
13 13
14 SampledEffect::SampledEffect(Animation* animation, PassOwnPtrWillBeRawPtr<WillBe HeapVector<RefPtrWillBeMember<Interpolation>>> interpolations) 14 SampledEffect::SampledEffect(KeyframeEffect* effect, PassOwnPtrWillBeRawPtr<Will BeHeapVector<RefPtrWillBeMember<Interpolation>>> interpolations)
15 : m_animation(animation) 15 : m_effect(effect)
16 , m_player(animation->player()) 16 , m_animation(effect->animation())
17 , m_interpolations(interpolations) 17 , m_interpolations(interpolations)
18 , m_sequenceNumber(animation->player()->sequenceNumber()) 18 , m_sequenceNumber(effect->animation()->sequenceNumber())
19 , m_priority(animation->priority()) 19 , m_priority(effect->priority())
20 { 20 {
21 ASSERT(m_interpolations && !m_interpolations->isEmpty()); 21 ASSERT(m_interpolations && !m_interpolations->isEmpty());
22 } 22 }
23 23
24 void SampledEffect::clear() 24 void SampledEffect::clear()
25 { 25 {
26 m_player = nullptr; 26 m_effect = nullptr;
27 m_animation = nullptr; 27 m_animation = nullptr;
28 m_interpolations->clear(); 28 m_interpolations->clear();
29 } 29 }
30 30
31 DEFINE_TRACE(SampledEffect) 31 DEFINE_TRACE(SampledEffect)
32 { 32 {
33 visitor->trace(m_effect);
33 visitor->trace(m_animation); 34 visitor->trace(m_animation);
34 visitor->trace(m_player);
35 #if ENABLE(OILPAN) 35 #if ENABLE(OILPAN)
36 visitor->trace(m_interpolations); 36 visitor->trace(m_interpolations);
37 #endif 37 #endif
38 } 38 }
39 39
40 void SampledEffect::applySVGUpdate(SVGElement& targetElement) 40 void SampledEffect::applySVGUpdate(SVGElement& targetElement)
41 { 41 {
42 for (const auto& interpolation : *m_interpolations) { 42 for (const auto& interpolation : *m_interpolations) {
43 if (interpolation->isSVGInterpolation()) { 43 if (interpolation->isSVGInterpolation()) {
44 toSVGInterpolation(interpolation.get())->apply(targetElement); 44 toSVGInterpolation(interpolation.get())->apply(targetElement);
45 } 45 }
46 } 46 }
47 } 47 }
48 48
49 } // namespace blink 49 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/animation/SampledEffect.h ('k') | Source/core/animation/StringKeyframe.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698