Chromium Code Reviews| Index: Source/core/animation/InterpolationPipelineStage.h |
| diff --git a/Source/core/animation/InterpolationPipelineStage.h b/Source/core/animation/InterpolationPipelineStage.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..062ae81047aeba3f6a3473c3ea7560836867e747 |
| --- /dev/null |
| +++ b/Source/core/animation/InterpolationPipelineStage.h |
| @@ -0,0 +1,64 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef InterpolationPipelineStage_h |
| +#define InterpolationPipelineStage_h |
| + |
| +#include "core/CSSPropertyNames.h" |
| +#include "core/animation/Interpolation.h" |
| +#include "platform/heap/Handle.h" |
| + |
| +namespace blink { |
| + |
| +class InterpolationPipelineStage : public RefCountedWillBeGarbageCollected<InterpolationPipelineStage> { |
| +public: |
| + static PassRefPtrWillBeRawPtr<InterpolationPipelineStage> create(PassRefPtrWillBeRawPtr<Interpolation> interpolation) |
| + { |
| + return adoptRefWillBeNoop(new InterpolationPipelineStage(interpolation)); |
| + } |
| + |
| + RefPtrWillBeRawPtr<Interpolation> interpolation() const |
| + { |
| + return m_interpolation; |
| + } |
| + |
| + RefPtrWillBeRawPtr<InterpolationPipelineStage> next() const |
| + { |
| + return m_next; |
| + } |
| + |
| + void setNext(RefPtrWillBeRawPtr<InterpolationPipelineStage> next) |
|
alancutter (OOO until 2018)
2015/02/12 05:55:45
This should be a PassRefPtr.
|
| + { |
| + if (next) { |
| + m_next = next; |
| + } else { |
| + RefPtrWillBeRawPtr<InterpolationPipelineStage> a = nullptr; |
| + m_next = a; |
| + } |
|
alancutter (OOO until 2018)
2015/02/12 05:55:45
Why not just set m_next = next?
|
| + } |
| + |
| + void trace(Visitor* visitor) |
| + { |
| + m_interpolation->trace(visitor); |
| + m_next->trace(visitor); |
| + } |
| + |
| + ~InterpolationPipelineStage() |
| + { |
| + } |
|
alancutter (OOO until 2018)
2015/02/12 05:55:45
This is unneeded.
|
| +private: |
| + InterpolationPipelineStage(PassRefPtrWillBeRawPtr<Interpolation> interpolation) |
| + : m_interpolation(interpolation) |
| + , m_next(nullptr) |
| + { |
| + } |
| + |
| + RefPtrWillBeMember<Interpolation> m_interpolation; |
| + |
| + RefPtrWillBeMember<InterpolationPipelineStage> m_next; |
| +}; |
| + |
| +} // namespace blink |
| + |
| +#endif // InterpolationPipelineStage_h |