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

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

Issue 1120003002: [Oilpan] Migrate most classes under core/animations to Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 years, 4 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 | « Source/core/animation/SampledEffect.h ('k') | Source/core/animation/ShadowStyleInterpolation.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(KeyframeEffect* effect, PassOwnPtrWillBeRawPtr<Will BeHeapVector<RefPtrWillBeMember<Interpolation>>> interpolations) 14 SampledEffect::SampledEffect(KeyframeEffect* effect, HeapVector<Member<Interpola tion>>* interpolations)
15 : m_effect(effect) 15 : m_effect(effect)
16 , m_animation(effect->animation()) 16 , m_animation(effect->animation())
17 , m_interpolations(interpolations) 17 , m_interpolations(interpolations)
18 , m_sequenceNumber(effect->animation()->sequenceNumber()) 18 , m_sequenceNumber(effect->animation()->sequenceNumber())
19 , m_priority(effect->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_effect = 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_effect);
34 visitor->trace(m_animation); 34 visitor->trace(m_animation);
35 #if ENABLE(OILPAN)
36 visitor->trace(m_interpolations); 35 visitor->trace(m_interpolations);
37 #endif
38 } 36 }
39 37
40 void SampledEffect::applySVGUpdate(SVGElement& targetElement) 38 void SampledEffect::applySVGUpdate(SVGElement& targetElement)
41 { 39 {
42 for (const auto& interpolation : *m_interpolations) { 40 for (const auto& interpolation : *m_interpolations) {
43 if (interpolation->isSVGInterpolation()) { 41 if (interpolation->isSVGInterpolation()) {
44 toSVGInterpolation(interpolation.get())->apply(targetElement); 42 toSVGInterpolation(interpolation.get())->apply(targetElement);
45 } 43 }
46 } 44 }
47 } 45 }
48 46
49 } // namespace blink 47 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/animation/SampledEffect.h ('k') | Source/core/animation/ShadowStyleInterpolation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698