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

Unified Diff: Source/core/animation/AnimatableStrokeDasharrayList.cpp

Issue 204743002: Oilpan: Move AnimatableValue's hierarchy to oilpan's heap (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/animation/AnimatableStrokeDasharrayList.cpp
diff --git a/Source/core/animation/AnimatableStrokeDasharrayList.cpp b/Source/core/animation/AnimatableStrokeDasharrayList.cpp
index 0c219e381fc34c7a9148304f579b212645d6a9a3..5d4ff29d43c4195bce4f7f57fa61141c459906b6 100644
--- a/Source/core/animation/AnimatableStrokeDasharrayList.cpp
+++ b/Source/core/animation/AnimatableStrokeDasharrayList.cpp
@@ -62,10 +62,10 @@ bool AnimatableStrokeDasharrayList::usesDefaultInterpolationWith(const Animatabl
return false;
}
-PassRefPtr<AnimatableValue> AnimatableStrokeDasharrayList::interpolateTo(const AnimatableValue* value, double fraction) const
+PassRefPtrWillBeRawPtr<AnimatableValue> AnimatableStrokeDasharrayList::interpolateTo(const AnimatableValue* value, double fraction) const
{
- Vector<RefPtr<AnimatableValue> > from = m_values;
- Vector<RefPtr<AnimatableValue> > to = toAnimatableStrokeDasharrayList(value)->m_values;
+ WillBeHeapVector<RefPtrWillBeMember<AnimatableValue> > from = m_values;
+ WillBeHeapVector<RefPtrWillBeMember<AnimatableValue> > to = toAnimatableStrokeDasharrayList(value)->m_values;
// The spec states that if the sum of all values is zero, this should be
// treated like a value of 'none', which means that a solid line is drawn.
@@ -75,7 +75,11 @@ PassRefPtr<AnimatableValue> AnimatableStrokeDasharrayList::interpolateTo(const A
if (from.isEmpty() && to.isEmpty())
return takeConstRef(this);
if (from.isEmpty() || to.isEmpty()) {
+#if ENABLE_OILPAN
+ DEFINE_STATIC_LOCAL(Persistent<AnimatableSVGLength>, zeroPixels, (AnimatableSVGLength::create(SVGLength::create())));
+#else
DEFINE_STATIC_REF(AnimatableSVGLength, zeroPixels, AnimatableSVGLength::create(SVGLength::create()).leakRef());
+#endif
if (from.isEmpty()) {
from.append(zeroPixels);
from.append(zeroPixels);
@@ -86,10 +90,15 @@ PassRefPtr<AnimatableValue> AnimatableStrokeDasharrayList::interpolateTo(const A
}
}
- Vector<RefPtr<AnimatableValue> > interpolatedValues;
+ WillBeHeapVector<RefPtrWillBeMember<AnimatableValue> > interpolatedValues;
bool success = interpolateLists(from, to, fraction, interpolatedValues);
ASSERT_UNUSED(success, success);
- return adoptRef(new AnimatableStrokeDasharrayList(interpolatedValues));
+ return adoptRefWillBeNoop(new AnimatableStrokeDasharrayList(interpolatedValues));
+}
+
+void AnimatableStrokeDasharrayList::trace(Visitor* visitor)
+{
+ AnimatableRepeatable::trace(visitor);
}
} // namespace WebCore
« no previous file with comments | « Source/core/animation/AnimatableStrokeDasharrayList.h ('k') | Source/core/animation/AnimatableStrokeDasharrayListTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698