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

Unified Diff: Source/core/animation/PrimitiveInterpolation.h

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/PointSVGInterpolation.h ('k') | Source/core/animation/RectSVGInterpolation.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/PrimitiveInterpolation.h
diff --git a/Source/core/animation/PrimitiveInterpolation.h b/Source/core/animation/PrimitiveInterpolation.h
index cad230ecddd1b779fff8e5b26f39984352a236d4..3f87e8460e1a5467e7db3f5fe3e536e0989006d7 100644
--- a/Source/core/animation/PrimitiveInterpolation.h
+++ b/Source/core/animation/PrimitiveInterpolation.h
@@ -17,13 +17,12 @@ class StyleResolverState;
// Represents a conversion from a pair of keyframes to something compatible with interpolation.
// This is agnostic to whether the keyframes are compatible with each other or not.
-class PrimitiveInterpolation : public NoBaseWillBeGarbageCollectedFinalized<PrimitiveInterpolation> {
- WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(PrimitiveInterpolation);
+class PrimitiveInterpolation : public GarbageCollectedFinalized<PrimitiveInterpolation> {
WTF_MAKE_NONCOPYABLE(PrimitiveInterpolation);
public:
virtual ~PrimitiveInterpolation() { }
- virtual void interpolateValue(double fraction, OwnPtrWillBeMember<InterpolationValue>& result) const = 0;
+ virtual void interpolateValue(double fraction, Member<InterpolationValue>& result) const = 0;
virtual double interpolateUnderlyingFraction(double start, double end, double fraction) const = 0;
virtual bool isFlip() const { return false; }
@@ -38,12 +37,12 @@ class PairwisePrimitiveInterpolation : public PrimitiveInterpolation {
public:
~PairwisePrimitiveInterpolation() override { }
- static PassOwnPtrWillBeRawPtr<PairwisePrimitiveInterpolation> create(const InterpolationType& type, PassOwnPtrWillBeRawPtr<InterpolableValue> start, PassOwnPtrWillBeRawPtr<InterpolableValue> end, PassRefPtrWillBeRawPtr<NonInterpolableValue> nonInterpolableValue)
+ static PairwisePrimitiveInterpolation* create(const InterpolationType& type, InterpolableValue* start, InterpolableValue* end, NonInterpolableValue* nonInterpolableValue)
{
- return adoptPtrWillBeNoop(new PairwisePrimitiveInterpolation(type, start, end, nonInterpolableValue));
+ return new PairwisePrimitiveInterpolation(type, start, end, nonInterpolableValue);
}
- PassOwnPtrWillBeRawPtr<InterpolationValue> initialValue() const
+ InterpolationValue* initialValue() const
{
return InterpolationValue::create(m_type, m_start->clone(), m_nonInterpolableValue);
}
@@ -57,14 +56,14 @@ public:
}
private:
- PairwisePrimitiveInterpolation(const InterpolationType& type, PassOwnPtrWillBeRawPtr<InterpolableValue> start, PassOwnPtrWillBeRawPtr<InterpolableValue> end, PassRefPtrWillBeRawPtr<NonInterpolableValue> nonInterpolableValue)
+ PairwisePrimitiveInterpolation(const InterpolationType& type, InterpolableValue* start, InterpolableValue* end, NonInterpolableValue* nonInterpolableValue)
: m_type(type)
, m_start(start)
, m_end(end)
, m_nonInterpolableValue(nonInterpolableValue)
{ }
- void interpolateValue(double fraction, OwnPtrWillBeMember<InterpolationValue>& result) const final
+ void interpolateValue(double fraction, Member<InterpolationValue>& result) const final
{
ASSERT(result);
ASSERT(&result->type() == &m_type);
@@ -75,9 +74,9 @@ private:
double interpolateUnderlyingFraction(double start, double end, double fraction) const final { return blend(start, end, fraction); }
const InterpolationType& m_type;
- OwnPtrWillBeMember<InterpolableValue> m_start;
- OwnPtrWillBeMember<InterpolableValue> m_end;
- RefPtrWillBeMember<NonInterpolableValue> m_nonInterpolableValue;
+ Member<InterpolableValue> m_start;
+ Member<InterpolableValue> m_end;
+ Member<NonInterpolableValue> m_nonInterpolableValue;
};
// Represents a pair of incompatible keyframes that fall back to 50% flip behaviour eg. "auto" and "0px".
@@ -85,9 +84,9 @@ class FlipPrimitiveInterpolation : public PrimitiveInterpolation {
public:
~FlipPrimitiveInterpolation() override { }
- static PassOwnPtrWillBeRawPtr<FlipPrimitiveInterpolation> create(PassOwnPtrWillBeRawPtr<InterpolationValue> start, PassOwnPtrWillBeRawPtr<InterpolationValue> end)
+ static FlipPrimitiveInterpolation* create(InterpolationValue* start, InterpolationValue* end)
{
- return adoptPtrWillBeNoop(new FlipPrimitiveInterpolation(start, end));
+ return new FlipPrimitiveInterpolation(start, end);
}
DEFINE_INLINE_VIRTUAL_TRACE()
@@ -98,13 +97,13 @@ public:
}
private:
- FlipPrimitiveInterpolation(PassOwnPtrWillBeRawPtr<InterpolationValue> start, PassOwnPtrWillBeRawPtr<InterpolationValue> end)
+ FlipPrimitiveInterpolation(InterpolationValue* start, InterpolationValue* end)
: m_start(start)
, m_end(end)
, m_lastFraction(std::numeric_limits<double>::quiet_NaN())
{ }
- void interpolateValue(double fraction, OwnPtrWillBeMember<InterpolationValue>& result) const final
+ void interpolateValue(double fraction, Member<InterpolationValue>& result) const final
{
// TODO(alancutter): Remove this optimisation once Oilpan is default.
if (!std::isnan(m_lastFraction) && (fraction < 0.5) == (m_lastFraction < 0.5))
@@ -118,8 +117,8 @@ private:
bool isFlip() const final { return true; }
- OwnPtrWillBeMember<InterpolationValue> m_start;
- OwnPtrWillBeMember<InterpolationValue> m_end;
+ Member<InterpolationValue> m_start;
+ Member<InterpolationValue> m_end;
mutable double m_lastFraction;
};
« no previous file with comments | « Source/core/animation/PointSVGInterpolation.h ('k') | Source/core/animation/RectSVGInterpolation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698