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

Unified Diff: Source/core/animation/InterpolationEffect.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/animation/InterpolationEffect.h ('k') | Source/core/animation/InterpolationEffectTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/InterpolationEffect.cpp
diff --git a/Source/core/animation/InterpolationEffect.cpp b/Source/core/animation/InterpolationEffect.cpp
index 549ac70d04b8d5854307f070ec5a0a76cbbbc62a..ad8497a18b95ff3653bb6fe21080201eb1339862 100644
--- a/Source/core/animation/InterpolationEffect.cpp
+++ b/Source/core/animation/InterpolationEffect.cpp
@@ -7,17 +7,17 @@
namespace blink {
-void InterpolationEffect::getActiveInterpolations(double fraction, double iterationDuration, OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>>& result) const
+void InterpolationEffect::getActiveInterpolations(double fraction, double iterationDuration, HeapVector<Member<Interpolation>>*& result) const
{
if (!result)
- result = adoptPtrWillBeNoop(new WillBeHeapVector<RefPtrWillBeMember<Interpolation>>());
+ result = new HeapVector<Member<Interpolation>>();
size_t existingSize = result->size();
size_t resultIndex = 0;
for (const auto& record : m_interpolations) {
if (fraction >= record->m_applyFrom && fraction < record->m_applyTo) {
- RefPtrWillBeRawPtr<Interpolation> interpolation = record->m_interpolation;
+ Interpolation* interpolation = record->m_interpolation;
double localFraction = (fraction - record->m_start) / (record->m_end - record->m_start);
if (record->m_easing)
localFraction = record->m_easing->evaluate(localFraction, accuracyForDuration(iterationDuration));
@@ -34,13 +34,13 @@ void InterpolationEffect::getActiveInterpolations(double fraction, double iterat
void InterpolationEffect::addInterpolationsFromKeyframes(PropertyHandle property, Element* element, const ComputedStyle* baseStyle, Keyframe::PropertySpecificKeyframe& keyframeA, Keyframe::PropertySpecificKeyframe& keyframeB, double applyFrom, double applyTo)
{
- RefPtrWillBeRawPtr<Interpolation> interpolation = keyframeA.maybeCreateInterpolation(property, keyframeB, element, baseStyle);
+ Interpolation* interpolation = keyframeA.maybeCreateInterpolation(property, keyframeB, element, baseStyle);
if (interpolation) {
addInterpolation(interpolation, &keyframeA.easing(), keyframeA.offset(), keyframeB.offset(), applyFrom, applyTo);
} else {
- RefPtrWillBeRawPtr<Interpolation> interpolationA = keyframeA.maybeCreateInterpolation(property, keyframeA, element, baseStyle);
- RefPtrWillBeRawPtr<Interpolation> interpolationB = keyframeB.maybeCreateInterpolation(property, keyframeB, element, baseStyle);
+ Interpolation* interpolationA = keyframeA.maybeCreateInterpolation(property, keyframeA, element, baseStyle);
+ Interpolation* interpolationB = keyframeB.maybeCreateInterpolation(property, keyframeB, element, baseStyle);
Vector<TimingFunction::PartitionRegion> regions = Vector<TimingFunction::PartitionRegion>();
keyframeA.easing().partition(regions);
@@ -63,8 +63,7 @@ void InterpolationEffect::addInterpolationsFromKeyframes(PropertyHandle property
}
if (interpolation) {
- addInterpolation(interpolation.release(),
- &keyframeA.easing(), regionStart, regionEnd, regionApplyFrom, regionApplyTo);
+ addInterpolation(interpolation, &keyframeA.easing(), regionStart, regionEnd, regionApplyFrom, regionApplyTo);
}
regionIndex++;
« no previous file with comments | « Source/core/animation/InterpolationEffect.h ('k') | Source/core/animation/InterpolationEffectTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698