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

Unified Diff: third_party/WebKit/Source/core/animation/CSSFilterListInterpolationType.cpp

Issue 1977763002: Remove OwnPtr::release() calls in core/ (part 1). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove static_pointer_cast<>s. Created 4 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/animation/CSSFilterListInterpolationType.cpp
diff --git a/third_party/WebKit/Source/core/animation/CSSFilterListInterpolationType.cpp b/third_party/WebKit/Source/core/animation/CSSFilterListInterpolationType.cpp
index 91eb2021d00c2e697e3fcc556ef2d58409545021..f7bee75fb1d51fe377a10198eb99b14fd1194d8b 100644
--- a/third_party/WebKit/Source/core/animation/CSSFilterListInterpolationType.cpp
+++ b/third_party/WebKit/Source/core/animation/CSSFilterListInterpolationType.cpp
@@ -73,10 +73,10 @@ InterpolationValue convertFilterList(const FilterOperations& filterOperations, d
InterpolationValue filterResult = FilterInterpolationFunctions::maybeConvertFilter(*filterOperations.operations()[i], zoom);
if (!filterResult)
return nullptr;
- interpolableList->set(i, filterResult.interpolableValue.release());
+ interpolableList->set(i, std::move(filterResult.interpolableValue));
nonInterpolableValues[i] = filterResult.nonInterpolableValue.release();
}
- return InterpolationValue(interpolableList.release(), NonInterpolableList::create(std::move(nonInterpolableValues)));
+ return InterpolationValue(std::move(interpolableList), NonInterpolableList::create(std::move(nonInterpolableValues)));
}
} // namespace
@@ -117,10 +117,10 @@ InterpolationValue CSSFilterListInterpolationType::maybeConvertValue(const CSSVa
InterpolationValue itemResult = FilterInterpolationFunctions::maybeConvertCSSFilter(*list.item(i));
if (!itemResult)
return nullptr;
- interpolableList->set(i, itemResult.interpolableValue.release());
+ interpolableList->set(i, std::move(itemResult.interpolableValue));
nonInterpolableValues[i] = itemResult.nonInterpolableValue.release();
}
- return InterpolationValue(interpolableList.release(), NonInterpolableList::create(std::move(nonInterpolableValues)));
+ return InterpolationValue(std::move(interpolableList), NonInterpolableList::create(std::move(nonInterpolableValues)));
}
InterpolationValue CSSFilterListInterpolationType::maybeConvertUnderlyingValue(const InterpolationEnvironment& environment) const
@@ -142,7 +142,7 @@ PairwiseInterpolationValue CSSFilterListInterpolationType::maybeMergeSingles(Int
}
if (startLength == endLength)
- return PairwiseInterpolationValue(start.interpolableValue.release(), end.interpolableValue.release(), start.nonInterpolableValue.release());
+ return PairwiseInterpolationValue(std::move(start.interpolableValue), std::move(end.interpolableValue), start.nonInterpolableValue.release());
// Extend the shorter InterpolableList with neutral values that are compatible with corresponding filters in the longer list.
InterpolationValue& shorter = startLength < endLength ? start : end;
@@ -154,13 +154,13 @@ PairwiseInterpolationValue CSSFilterListInterpolationType::maybeMergeSingles(Int
OwnPtr<InterpolableList> extendedInterpolableList = InterpolableList::create(longerLength);
for (size_t i = 0; i < longerLength; i++) {
if (i < shorterLength)
- extendedInterpolableList->set(i, shorterInterpolableList.getMutable(i).release());
+ extendedInterpolableList->set(i, std::move(shorterInterpolableList.getMutable(i)));
else
extendedInterpolableList->set(i, FilterInterpolationFunctions::createNoneValue(*longerNonInterpolableList.get(i)));
}
- shorter.interpolableValue = extendedInterpolableList.release();
+ shorter.interpolableValue = std::move(extendedInterpolableList);
- return PairwiseInterpolationValue(start.interpolableValue.release(), end.interpolableValue.release(), longer.nonInterpolableValue.release());
+ return PairwiseInterpolationValue(std::move(start.interpolableValue), std::move(end.interpolableValue), longer.nonInterpolableValue.release());
}
void CSSFilterListInterpolationType::composite(UnderlyingValueOwner& underlyingValueOwner, double underlyingFraction, const InterpolationValue& value, double interpolationFraction) const
@@ -191,11 +191,11 @@ void CSSFilterListInterpolationType::composite(UnderlyingValueOwner& underlyingV
OwnPtr<InterpolableList> extendedInterpolableList = InterpolableList::create(length);
for (size_t i = 0; i < length; i++) {
if (i < underlyingLength)
- extendedInterpolableList->set(i, underlyingInterpolableList.getMutable(i).release());
+ extendedInterpolableList->set(i, std::move(underlyingInterpolableList.getMutable(i)));
else
extendedInterpolableList->set(i, interpolableList.get(i)->clone());
}
- underlyingValueOwner.mutableValue().interpolableValue = extendedInterpolableList.release();
+ underlyingValueOwner.mutableValue().interpolableValue = std::move(extendedInterpolableList);
// const_cast to take a ref.
underlyingValueOwner.mutableValue().nonInterpolableValue = const_cast<NonInterpolableValue*>(value.nonInterpolableValue.get());
}

Powered by Google App Engine
This is Rietveld 408576698