Commit 6cf9aeea authored by tasak@google.com's avatar tasak@google.com

Make classes and structures in Source/core/animation fast-allocated.

BUG=

Review URL: https://codereview.chromium.org/1302463002

git-svn-id: svn://svn.chromium.org/blink/trunk@200804 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 365bde6b
...@@ -60,6 +60,7 @@ class CORE_EXPORT Animation final ...@@ -60,6 +60,7 @@ class CORE_EXPORT Animation final
DEFINE_WRAPPERTYPEINFO(); DEFINE_WRAPPERTYPEINFO();
REFCOUNTED_EVENT_TARGET(Animation); REFCOUNTED_EVENT_TARGET(Animation);
WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(Animation); WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(Animation);
WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(Animation);
public: public:
enum AnimationPlayState { enum AnimationPlayState {
Idle, Idle,
...@@ -259,6 +260,8 @@ private: ...@@ -259,6 +260,8 @@ private:
}; };
class CompositorState { class CompositorState {
WTF_MAKE_FAST_ALLOCATED(CompositorState);
WTF_MAKE_NONCOPYABLE(CompositorState);
public: public:
CompositorState(Animation& animation) CompositorState(Animation& animation)
: startTime(animation.m_startTime) : startTime(animation.m_startTime)
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#define AnimationClock_h #define AnimationClock_h
#include "core/CoreExport.h" #include "core/CoreExport.h"
#include "wtf/Allocator.h"
#include "wtf/CurrentTime.h" #include "wtf/CurrentTime.h"
#include "wtf/Noncopyable.h" #include "wtf/Noncopyable.h"
#include "wtf/PassOwnPtr.h" #include "wtf/PassOwnPtr.h"
...@@ -40,6 +41,7 @@ ...@@ -40,6 +41,7 @@
namespace blink { namespace blink {
class CORE_EXPORT AnimationClock { class CORE_EXPORT AnimationClock {
DISALLOW_ALLOCATION();
WTF_MAKE_NONCOPYABLE(AnimationClock); WTF_MAKE_NONCOPYABLE(AnimationClock);
public: public:
explicit AnimationClock(WTF::TimeFunction monotonicallyIncreasingTime = WTF::monotonicallyIncreasingTime) explicit AnimationClock(WTF::TimeFunction monotonicallyIncreasingTime = WTF::monotonicallyIncreasingTime)
......
...@@ -74,6 +74,7 @@ public: ...@@ -74,6 +74,7 @@ public:
}; };
class EventDelegate : public NoBaseWillBeGarbageCollectedFinalized<EventDelegate> { class EventDelegate : public NoBaseWillBeGarbageCollectedFinalized<EventDelegate> {
WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(EventDelegate);
public: public:
virtual ~EventDelegate() { } virtual ~EventDelegate() { }
virtual bool requiresIterationEvents(const AnimationEffect&) = 0; virtual bool requiresIterationEvents(const AnimationEffect&) = 0;
...@@ -150,6 +151,7 @@ protected: ...@@ -150,6 +151,7 @@ protected:
OwnPtrWillBeMember<EventDelegate> m_eventDelegate; OwnPtrWillBeMember<EventDelegate> m_eventDelegate;
mutable struct CalculatedTiming { mutable struct CalculatedTiming {
DISALLOW_ALLOCATION();
Phase phase; Phase phase;
double currentIteration; double currentIteration;
double timeFraction; double timeFraction;
......
...@@ -14,6 +14,7 @@ namespace blink { ...@@ -14,6 +14,7 @@ namespace blink {
class TimingFunction; class TimingFunction;
class CORE_EXPORT AnimationInputHelpers { class CORE_EXPORT AnimationInputHelpers {
STATIC_ONLY(AnimationInputHelpers);
public: public:
static CSSPropertyID keyframeAttributeToCSSPropertyID(const String&); static CSSPropertyID keyframeAttributeToCSSPropertyID(const String&);
static PassRefPtr<TimingFunction> parseTimingFunction(const String&); static PassRefPtr<TimingFunction> parseTimingFunction(const String&);
......
...@@ -53,7 +53,7 @@ class CORE_EXPORT AnimationTimeline : public RefCountedWillBeGarbageCollectedFin ...@@ -53,7 +53,7 @@ class CORE_EXPORT AnimationTimeline : public RefCountedWillBeGarbageCollectedFin
DEFINE_WRAPPERTYPEINFO(); DEFINE_WRAPPERTYPEINFO();
public: public:
class PlatformTiming : public NoBaseWillBeGarbageCollectedFinalized<PlatformTiming> { class PlatformTiming : public NoBaseWillBeGarbageCollectedFinalized<PlatformTiming> {
WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(PlatformTiming);
public: public:
// Calls AnimationTimeline's wake() method after duration seconds. // Calls AnimationTimeline's wake() method after duration seconds.
virtual void wakeAfter(double duration) = 0; virtual void wakeAfter(double duration) = 0;
......
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#include "core/animation/EffectModel.h" #include "core/animation/EffectModel.h"
#include "core/animation/Timing.h" #include "core/animation/Timing.h"
#include "platform/animation/TimingFunction.h" #include "platform/animation/TimingFunction.h"
#include "wtf/Allocator.h"
#include "wtf/Vector.h" #include "wtf/Vector.h"
namespace blink { namespace blink {
...@@ -44,6 +45,8 @@ class Element; ...@@ -44,6 +45,8 @@ class Element;
class FloatBox; class FloatBox;
class CORE_EXPORT CompositorAnimations { class CORE_EXPORT CompositorAnimations {
WTF_MAKE_FAST_ALLOCATED(CompositorAnimations);
WTF_MAKE_NONCOPYABLE(CompositorAnimations);
public: public:
static CompositorAnimations* instance() { return instance(0); } static CompositorAnimations* instance() { return instance(0); }
static void setInstanceForTesting(CompositorAnimations* newInstance) { instance(newInstance); } static void setInstanceForTesting(CompositorAnimations* newInstance) { instance(newInstance); }
......
...@@ -37,14 +37,17 @@ ...@@ -37,14 +37,17 @@
#include "core/animation/Timing.h" #include "core/animation/Timing.h"
#include "platform/animation/TimingFunction.h" #include "platform/animation/TimingFunction.h"
#include "public/platform/WebCompositorAnimation.h" #include "public/platform/WebCompositorAnimation.h"
#include "wtf/Allocator.h"
namespace blink { namespace blink {
class WebCompositorAnimationCurve; class WebCompositorAnimationCurve;
class CORE_EXPORT CompositorAnimationsImpl { class CORE_EXPORT CompositorAnimationsImpl {
STATIC_ONLY(CompositorAnimationsImpl);
private: private:
struct CompositorTiming { struct CompositorTiming {
DISALLOW_ALLOCATION();
void assertValid() const void assertValid() const
{ {
ASSERT(scaledDuration > 0); ASSERT(scaledDuration > 0);
......
...@@ -6,10 +6,12 @@ ...@@ -6,10 +6,12 @@
#define DocumentAnimation_h #define DocumentAnimation_h
#include "core/dom/Document.h" #include "core/dom/Document.h"
#include "wtf/Allocator.h"
namespace blink { namespace blink {
class DocumentAnimation { class DocumentAnimation {
STATIC_ONLY(DocumentAnimation);
public: public:
static AnimationTimeline* timeline(Document& document) { return &document.timeline(); } static AnimationTimeline* timeline(Document& document) { return &document.timeline(); }
}; };
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#include "core/CoreExport.h" #include "core/CoreExport.h"
#include "core/animation/EffectModel.h" #include "core/animation/EffectModel.h"
#include "wtf/Allocator.h"
#include "wtf/Vector.h" #include "wtf/Vector.h"
namespace blink { namespace blink {
...@@ -18,6 +19,7 @@ class Element; ...@@ -18,6 +19,7 @@ class Element;
class ExceptionState; class ExceptionState;
class CORE_EXPORT EffectInput { class CORE_EXPORT EffectInput {
STATIC_ONLY(EffectInput);
public: public:
static PassRefPtrWillBeRawPtr<EffectModel> convert(Element*, const Vector<Dictionary>& keyframeDictionaryVector, ExceptionState&); static PassRefPtrWillBeRawPtr<EffectModel> convert(Element*, const Vector<Dictionary>& keyframeDictionaryVector, ExceptionState&);
static PassRefPtrWillBeRawPtr<EffectModel> convert(Element*, const EffectModelOrDictionarySequence&, ExceptionState&); static PassRefPtrWillBeRawPtr<EffectModel> convert(Element*, const EffectModelOrDictionarySequence&, ExceptionState&);
......
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
#include "core/dom/Document.h" #include "core/dom/Document.h"
#include "core/dom/Element.h" #include "core/dom/Element.h"
#include "platform/RuntimeEnabledFeatures.h" #include "platform/RuntimeEnabledFeatures.h"
#include "wtf/Allocator.h"
namespace blink { namespace blink {
...@@ -47,6 +48,7 @@ namespace blink { ...@@ -47,6 +48,7 @@ namespace blink {
class Dictionary; class Dictionary;
class ElementAnimation { class ElementAnimation {
STATIC_ONLY(ElementAnimation);
public: public:
static Animation* animate(Element& element, const EffectModelOrDictionarySequence& effectInput, double duration, ExceptionState& exceptionState) static Animation* animate(Element& element, const EffectModelOrDictionarySequence& effectInput, double duration, ExceptionState& exceptionState)
{ {
......
...@@ -45,6 +45,7 @@ class CSSAnimations; ...@@ -45,6 +45,7 @@ class CSSAnimations;
using AnimationCountedSet = WillBeHeapHashCountedSet<RawPtrWillBeWeakMember<Animation>>; using AnimationCountedSet = WillBeHeapHashCountedSet<RawPtrWillBeWeakMember<Animation>>;
class ElementAnimations : public NoBaseWillBeGarbageCollectedFinalized<ElementAnimations> { class ElementAnimations : public NoBaseWillBeGarbageCollectedFinalized<ElementAnimations> {
WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(ElementAnimations);
WTF_MAKE_NONCOPYABLE(ElementAnimations); WTF_MAKE_NONCOPYABLE(ElementAnimations);
public: public:
ElementAnimations(); ElementAnimations();
......
...@@ -16,6 +16,7 @@ namespace blink { ...@@ -16,6 +16,7 @@ namespace blink {
class CORE_EXPORT InterpolableValue : public NoBaseWillBeGarbageCollected<InterpolableValue> { class CORE_EXPORT InterpolableValue : public NoBaseWillBeGarbageCollected<InterpolableValue> {
DECLARE_EMPTY_VIRTUAL_DESTRUCTOR_WILL_BE_REMOVED(InterpolableValue); DECLARE_EMPTY_VIRTUAL_DESTRUCTOR_WILL_BE_REMOVED(InterpolableValue);
WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(InterpolableValue);
public: public:
virtual bool isNumber() const { return false; } virtual bool isNumber() const { return false; }
virtual bool isBool() const { return false; } virtual bool isBool() const { return false; }
......
...@@ -14,6 +14,7 @@ namespace blink { ...@@ -14,6 +14,7 @@ namespace blink {
class PropertyHandle; class PropertyHandle;
class CORE_EXPORT Interpolation : public RefCountedWillBeGarbageCollectedFinalized<Interpolation> { class CORE_EXPORT Interpolation : public RefCountedWillBeGarbageCollectedFinalized<Interpolation> {
WTF_MAKE_NONCOPYABLE(Interpolation);
public: public:
virtual ~Interpolation(); virtual ~Interpolation();
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include "core/animation/PrimitiveInterpolation.h" #include "core/animation/PrimitiveInterpolation.h"
#include "core/animation/StringKeyframe.h" #include "core/animation/StringKeyframe.h"
#include "platform/heap/Handle.h" #include "platform/heap/Handle.h"
#include "wtf/Allocator.h"
namespace blink { namespace blink {
...@@ -19,15 +20,21 @@ class StyleResolverState; ...@@ -19,15 +20,21 @@ class StyleResolverState;
// - Converts from animation keyframe(s) to interpolation compatible representations: maybeConvertPairwise() and maybeConvertSingle() // - Converts from animation keyframe(s) to interpolation compatible representations: maybeConvertPairwise() and maybeConvertSingle()
// - Applies interpolation compatible representations of values to a StyleResolverState: apply() // - Applies interpolation compatible representations of values to a StyleResolverState: apply()
class InterpolationType { class InterpolationType {
WTF_MAKE_FAST_ALLOCATED(InterpolationType);
WTF_MAKE_NONCOPYABLE(InterpolationType);
public: public:
CSSPropertyID property() const { return m_property; } CSSPropertyID property() const { return m_property; }
// Represents logic for determining whether a conversion decision is no longer valid given the current environment. // Represents logic for determining whether a conversion decision is no longer valid given the current environment.
class ConversionChecker : public NoBaseWillBeGarbageCollectedFinalized<ConversionChecker> { class ConversionChecker : public NoBaseWillBeGarbageCollectedFinalized<ConversionChecker> {
WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(ConversionChecker);
WTF_MAKE_NONCOPYABLE(ConversionChecker);
public: public:
virtual ~ConversionChecker() { } virtual ~ConversionChecker() { }
virtual bool isValid(const StyleResolverState&) const = 0; virtual bool isValid(const StyleResolverState&) const = 0;
DEFINE_INLINE_VIRTUAL_TRACE() { } DEFINE_INLINE_VIRTUAL_TRACE() { }
protected:
ConversionChecker() { }
}; };
using ConversionCheckers = WillBeHeapVector<OwnPtrWillBeMember<ConversionChecker>>; using ConversionCheckers = WillBeHeapVector<OwnPtrWillBeMember<ConversionChecker>>;
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include "core/animation/EffectModel.h" #include "core/animation/EffectModel.h"
#include "core/animation/PropertyHandle.h" #include "core/animation/PropertyHandle.h"
#include "core/animation/animatable/AnimatableValue.h" #include "core/animation/animatable/AnimatableValue.h"
#include "wtf/Allocator.h"
namespace blink { namespace blink {
...@@ -20,6 +21,8 @@ class ComputedStyle; ...@@ -20,6 +21,8 @@ class ComputedStyle;
// FIXME: Make Keyframe immutable // FIXME: Make Keyframe immutable
class CORE_EXPORT Keyframe : public RefCountedWillBeGarbageCollectedFinalized<Keyframe> { class CORE_EXPORT Keyframe : public RefCountedWillBeGarbageCollectedFinalized<Keyframe> {
WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(Keyframe);
WTF_MAKE_NONCOPYABLE(Keyframe);
public: public:
virtual ~Keyframe() { } virtual ~Keyframe() { }
...@@ -53,6 +56,8 @@ public: ...@@ -53,6 +56,8 @@ public:
DEFINE_INLINE_VIRTUAL_TRACE() { } DEFINE_INLINE_VIRTUAL_TRACE() { }
class PropertySpecificKeyframe : public NoBaseWillBeGarbageCollectedFinalized<PropertySpecificKeyframe> { class PropertySpecificKeyframe : public NoBaseWillBeGarbageCollectedFinalized<PropertySpecificKeyframe> {
WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(PropertySpecificKeyframe);
WTF_MAKE_NONCOPYABLE(PropertySpecificKeyframe);
public: public:
virtual ~PropertySpecificKeyframe() { } virtual ~PropertySpecificKeyframe() { }
double offset() const { return m_offset; } double offset() const { return m_offset; }
......
...@@ -8,12 +8,14 @@ ...@@ -8,12 +8,14 @@
#include "core/CSSPropertyNames.h" #include "core/CSSPropertyNames.h"
#include "core/CSSValueKeywords.h" #include "core/CSSValueKeywords.h"
#include "platform/Length.h" #include "platform/Length.h"
#include "wtf/Allocator.h"
namespace blink { namespace blink {
class ComputedStyle; class ComputedStyle;
class LengthPropertyFunctions { class LengthPropertyFunctions {
STATIC_ONLY(LengthPropertyFunctions);
public: public:
typedef void (ComputedStyle::*LengthSetter)(const Length&); typedef void (ComputedStyle::*LengthSetter)(const Length&);
......
...@@ -15,6 +15,7 @@ class LengthSVGInterpolation : public SVGInterpolation { ...@@ -15,6 +15,7 @@ class LengthSVGInterpolation : public SVGInterpolation {
public: public:
typedef SVGLengthList ListType; typedef SVGLengthList ListType;
struct NonInterpolableType { struct NonInterpolableType {
DISALLOW_ALLOCATION();
SVGLengthMode unitMode; SVGLengthMode unitMode;
SVGLengthNegativeValuesMode negativeValuesMode; SVGLengthNegativeValuesMode negativeValuesMode;
}; };
......
...@@ -7,10 +7,12 @@ ...@@ -7,10 +7,12 @@
#include "core/animation/SVGInterpolation.h" #include "core/animation/SVGInterpolation.h"
#include "core/svg/SVGPointList.h" #include "core/svg/SVGPointList.h"
#include "wtf/Allocator.h"
namespace blink { namespace blink {
class PointSVGInterpolation { class PointSVGInterpolation {
STATIC_ONLY(PointSVGInterpolation);
public: public:
typedef SVGPointList ListType; typedef SVGPointList ListType;
typedef void NonInterpolableType; typedef void NonInterpolableType;
......
...@@ -18,6 +18,8 @@ class StyleResolverState; ...@@ -18,6 +18,8 @@ class StyleResolverState;
// Represents a conversion from a pair of keyframes to something compatible with interpolation. // 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. // This is agnostic to whether the keyframes are compatible with each other or not.
class PrimitiveInterpolation : public NoBaseWillBeGarbageCollectedFinalized<PrimitiveInterpolation> { class PrimitiveInterpolation : public NoBaseWillBeGarbageCollectedFinalized<PrimitiveInterpolation> {
WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(PrimitiveInterpolation);
WTF_MAKE_NONCOPYABLE(PrimitiveInterpolation);
public: public:
virtual ~PrimitiveInterpolation() { } virtual ~PrimitiveInterpolation() { }
...@@ -26,6 +28,9 @@ public: ...@@ -26,6 +28,9 @@ public:
virtual bool isFlip() const { return false; } virtual bool isFlip() const { return false; }
DEFINE_INLINE_VIRTUAL_TRACE() { } DEFINE_INLINE_VIRTUAL_TRACE() { }
protected:
PrimitiveInterpolation() { }
}; };
// Represents a pair of keyframes that are compatible for "smooth" interpolation eg. "0px" and "100px". // Represents a pair of keyframes that are compatible for "smooth" interpolation eg. "0px" and "100px".
......
...@@ -8,10 +8,12 @@ ...@@ -8,10 +8,12 @@
#include "core/CSSPropertyNames.h" #include "core/CSSPropertyNames.h"
#include "core/CoreExport.h" #include "core/CoreExport.h"
#include "core/dom/QualifiedName.h" #include "core/dom/QualifiedName.h"
#include "wtf/Allocator.h"
namespace blink { namespace blink {
class CORE_EXPORT PropertyHandle { class CORE_EXPORT PropertyHandle {
ALLOW_ONLY_INLINE_ALLOCATION();
public: public:
explicit PropertyHandle(CSSPropertyID property) explicit PropertyHandle(CSSPropertyID property)
: handleType(HandleCSSProperty) : handleType(HandleCSSProperty)
...@@ -72,6 +74,7 @@ namespace WTF { ...@@ -72,6 +74,7 @@ namespace WTF {
template<> struct DefaultHash<blink::PropertyHandle> { template<> struct DefaultHash<blink::PropertyHandle> {
struct Hash { struct Hash {
STATIC_ONLY(Hash);
static unsigned hash(const blink::PropertyHandle& handle) { return handle.hash(); } static unsigned hash(const blink::PropertyHandle& handle) { return handle.hash(); }
static bool equal(const blink::PropertyHandle& a, const blink::PropertyHandle& b) { return a == b; } static bool equal(const blink::PropertyHandle& a, const blink::PropertyHandle& b) { return a == b; }
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#include "core/animation/Animation.h" #include "core/animation/Animation.h"
#include "core/animation/Interpolation.h" #include "core/animation/Interpolation.h"
#include "core/animation/KeyframeEffect.h" #include "core/animation/KeyframeEffect.h"
#include "wtf/Allocator.h"
#include "wtf/BitArray.h" #include "wtf/BitArray.h"
#include "wtf/Vector.h" #include "wtf/Vector.h"
...@@ -16,6 +17,8 @@ namespace blink { ...@@ -16,6 +17,8 @@ namespace blink {
class SVGElement; class SVGElement;
class SampledEffect : public NoBaseWillBeGarbageCollected<SampledEffect> { class SampledEffect : public NoBaseWillBeGarbageCollected<SampledEffect> {
WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(SampledEffect);
WTF_MAKE_NONCOPYABLE(SampledEffect);
public: public:
static PassOwnPtrWillBeRawPtr<SampledEffect> create(KeyframeEffect* animation, PassOwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>> interpolations) static PassOwnPtrWillBeRawPtr<SampledEffect> create(KeyframeEffect* animation, PassOwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>> interpolations)
{ {
......
...@@ -32,12 +32,15 @@ ...@@ -32,12 +32,15 @@
#define Timing_h #define Timing_h
#include "platform/animation/TimingFunction.h" #include "platform/animation/TimingFunction.h"
#include "wtf/Allocator.h"
#include "wtf/MathExtras.h" #include "wtf/MathExtras.h"
#include "wtf/RefPtr.h" #include "wtf/RefPtr.h"
namespace blink { namespace blink {
struct Timing { struct Timing {
WTF_MAKE_FAST_ALLOCATED(Timing);
public:
enum FillMode { enum FillMode {
FillModeAuto, FillModeAuto,
FillModeNone, FillModeNone,
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#include "core/CoreExport.h" #include "core/CoreExport.h"
#include "core/animation/Timing.h" #include "core/animation/Timing.h"
#include "wtf/Allocator.h"
namespace blink { namespace blink {
...@@ -14,6 +15,7 @@ class Dictionary; ...@@ -14,6 +15,7 @@ class Dictionary;
class KeyframeEffectOptions; class KeyframeEffectOptions;
class CORE_EXPORT TimingInput { class CORE_EXPORT TimingInput {
STATIC_ONLY(TimingInput);
public: public:
static Timing convert(const KeyframeEffectOptions& timingInput); static Timing convert(const KeyframeEffectOptions& timingInput);
static Timing convert(double duration); static Timing convert(double duration);
......
...@@ -7,10 +7,12 @@ ...@@ -7,10 +7,12 @@
#include "core/animation/SVGInterpolation.h" #include "core/animation/SVGInterpolation.h"
#include "core/svg/SVGTransformList.h" #include "core/svg/SVGTransformList.h"
#include "wtf/Allocator.h"
namespace blink { namespace blink {
class TransformSVGInterpolation { class TransformSVGInterpolation {
STATIC_ONLY(TransformSVGInterpolation);
public: public:
typedef SVGTransformList ListType; typedef SVGTransformList ListType;
typedef SVGTransformType NonInterpolableType; typedef SVGTransformType NonInterpolableType;
......
...@@ -34,10 +34,12 @@ ...@@ -34,10 +34,12 @@
#include "core/CoreExport.h" #include "core/CoreExport.h"
#include "core/animation/animatable/AnimatableValue.h" #include "core/animation/animatable/AnimatableValue.h"
#include "platform/graphics/Color.h" #include "platform/graphics/Color.h"
#include "wtf/Allocator.h"
namespace blink { namespace blink {
class CORE_EXPORT AnimatableColorImpl { class CORE_EXPORT AnimatableColorImpl {
DISALLOW_ALLOCATION();
public: public:
AnimatableColorImpl(float red, float green, float blue, float alpha); AnimatableColorImpl(float red, float green, float blue, float alpha);
AnimatableColorImpl(Color); AnimatableColorImpl(Color);
......
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#include "core/CSSPropertyNames.h" #include "core/CSSPropertyNames.h"
#include "core/animation/animatable/AnimatableValue.h" #include "core/animation/animatable/AnimatableValue.h"
#include "wtf/Allocator.h"
#include "wtf/PassRefPtr.h" #include "wtf/PassRefPtr.h"
namespace blink { namespace blink {
...@@ -40,6 +41,7 @@ namespace blink { ...@@ -40,6 +41,7 @@ namespace blink {
class ComputedStyle; class ComputedStyle;
class CSSAnimatableValueFactory { class CSSAnimatableValueFactory {
STATIC_ONLY(CSSAnimatableValueFactory);
public: public:
static PassRefPtrWillBeRawPtr<AnimatableValue> create(CSSPropertyID, const ComputedStyle&); static PassRefPtrWillBeRawPtr<AnimatableValue> create(CSSPropertyID, const ComputedStyle&);
private: private:
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#include "core/animation/css/CSSPropertyEquality.h" #include "core/animation/css/CSSPropertyEquality.h"
#include "core/css/CSSKeyframesRule.h" #include "core/css/CSSKeyframesRule.h"
#include "core/layout/LayoutObject.h" #include "core/layout/LayoutObject.h"
#include "wtf/Allocator.h"
#include "wtf/HashMap.h" #include "wtf/HashMap.h"
#include "wtf/Vector.h" #include "wtf/Vector.h"
#include "wtf/text/AtomicString.h" #include "wtf/text/AtomicString.h"
...@@ -24,7 +25,11 @@ class InertEffect; ...@@ -24,7 +25,11 @@ class InertEffect;
// This class stores the CSS Animations/Transitions information we use during a style recalc. // This class stores the CSS Animations/Transitions information we use during a style recalc.
// This includes updates to animations/transitions as well as the Interpolations to be applied. // This includes updates to animations/transitions as well as the Interpolations to be applied.
class CSSAnimationUpdate final : public NoBaseWillBeGarbageCollectedFinalized<CSSAnimationUpdate> { class CSSAnimationUpdate final : public NoBaseWillBeGarbageCollectedFinalized<CSSAnimationUpdate> {
WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(CSSAnimationUpdate);
WTF_MAKE_NONCOPYABLE(CSSAnimationUpdate);
public: public:
CSSAnimationUpdate() { }
class NewAnimation { class NewAnimation {
ALLOW_ONLY_INLINE_ALLOCATION(); ALLOW_ONLY_INLINE_ALLOCATION();
public: public:
......
...@@ -6,12 +6,14 @@ ...@@ -6,12 +6,14 @@
#define CSSPropertyEquality_h #define CSSPropertyEquality_h
#include "core/CSSPropertyNames.h" #include "core/CSSPropertyNames.h"
#include "wtf/Allocator.h"
namespace blink { namespace blink {
class ComputedStyle; class ComputedStyle;
class CSSPropertyEquality { class CSSPropertyEquality {
STATIC_ONLY(CSSPropertyEquality);
public: public:
static bool propertiesEqual(CSSPropertyID, const ComputedStyle&, const ComputedStyle&); static bool propertiesEqual(CSSPropertyID, const ComputedStyle&, const ComputedStyle&);
}; };
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#include "platform/animation/TimingFunction.h" #include "platform/animation/TimingFunction.h"
#include "platform/heap/Handle.h" #include "platform/heap/Handle.h"
#include "wtf/Allocator.h"
#include "wtf/Vector.h" #include "wtf/Vector.h"
namespace blink { namespace blink {
...@@ -14,6 +15,7 @@ namespace blink { ...@@ -14,6 +15,7 @@ namespace blink {
struct Timing; struct Timing;
class CSSTimingData { class CSSTimingData {
WTF_MAKE_FAST_ALLOCATED(CSSTimingData);
public: public:
~CSSTimingData() { } ~CSSTimingData() { }
......
...@@ -22,6 +22,7 @@ public: ...@@ -22,6 +22,7 @@ public:
// FIXME: We shouldn't allow 'none' to be used alongside other properties. // FIXME: We shouldn't allow 'none' to be used alongside other properties.
struct TransitionProperty { struct TransitionProperty {
ALLOW_ONLY_INLINE_ALLOCATION();
TransitionProperty(CSSPropertyID id) TransitionProperty(CSSPropertyID id)
: propertyType(TransitionSingleProperty) : propertyType(TransitionSingleProperty)
, unresolvedProperty(id) , unresolvedProperty(id)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment