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

Unified Diff: Source/core/animation/CompositorAnimationsTest.cpp

Issue 183923038: Oilpan: Fix tracing of KeyframeVector in CompositorAnimationsTest. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/CompositorAnimationsTest.cpp
diff --git a/Source/core/animation/CompositorAnimationsTest.cpp b/Source/core/animation/CompositorAnimationsTest.cpp
index 429b56e0287216cf807ff42c008179b2effbb5bc..d4f844caf57d0f0fc08fc0ce479b28ba8266e12b 100644
--- a/Source/core/animation/CompositorAnimationsTest.cpp
+++ b/Source/core/animation/CompositorAnimationsTest.cpp
@@ -61,7 +61,6 @@ using ::testing::Return;
using ::testing::_;
class AnimationCompositorAnimationsTest : public AnimationCompositorAnimationsTestBase {
-
protected:
RefPtr<TimingFunction> m_linearTimingFunction;
RefPtr<TimingFunction> m_cubicEaseTimingFunction;
@@ -70,9 +69,9 @@ protected:
Timing m_timing;
CompositorAnimationsImpl::CompositorTiming m_compositorTiming;
- KeyframeEffectModel::KeyframeVector m_keyframeVector2;
+ OwnPtrWillBePersistent<KeyframeEffectModel::KeyframeVector> m_keyframeVector2;
RefPtrWillBePersistent<KeyframeEffectModel> m_keyframeAnimationEffect2;
- KeyframeEffectModel::KeyframeVector m_keyframeVector5;
+ OwnPtrWillBePersistent<KeyframeEffectModel::KeyframeVector> m_keyframeVector5;
RefPtrWillBePersistent<KeyframeEffectModel> m_keyframeAnimationEffect5;
virtual void SetUp()
@@ -91,10 +90,10 @@ protected:
ASSERT(convertTimingForCompositor(m_timing, m_compositorTiming));
m_keyframeVector2 = createCompositableFloatKeyframeVector(2);
- m_keyframeAnimationEffect2 = KeyframeEffectModel::create(m_keyframeVector2);
+ m_keyframeAnimationEffect2 = KeyframeEffectModel::create(*m_keyframeVector2.get());
m_keyframeVector5 = createCompositableFloatKeyframeVector(5);
- m_keyframeAnimationEffect5 = KeyframeEffectModel::create(m_keyframeVector5);
+ m_keyframeAnimationEffect5 = KeyframeEffectModel::create(*m_keyframeVector5.get());
}
public:
@@ -117,8 +116,8 @@ public:
EXPECT_EQ(frame->offset(), 0);
KeyframeEffectModel::KeyframeVector frames;
frames.append(frame);
- EXPECT_EQ(m_keyframeVector2[1]->offset(), 1.0);
- frames.append(m_keyframeVector2[1]);
+ EXPECT_EQ((*m_keyframeVector2)[1]->offset(), 1.0);
+ frames.append((*m_keyframeVector2)[1]);
return isCandidateForAnimationOnCompositor(m_timing, *KeyframeEffectModel::create(frames).get());
}
@@ -161,7 +160,7 @@ public:
return keyframe;
}
- KeyframeEffectModel::KeyframeVector createCompositableFloatKeyframeVector(size_t n)
+ PassOwnPtrWillBeRawPtr<KeyframeEffectModel::KeyframeVector> createCompositableFloatKeyframeVector(size_t n)
{
Vector<double> values;
for (size_t i = 0; i < n; i++) {
@@ -170,15 +169,15 @@ public:
return createCompositableFloatKeyframeVector(values);
}
- KeyframeEffectModel::KeyframeVector createCompositableFloatKeyframeVector(Vector<double>& values)
+ PassOwnPtrWillBeRawPtr<KeyframeEffectModel::KeyframeVector> createCompositableFloatKeyframeVector(Vector<double>& values)
{
- KeyframeEffectModel::KeyframeVector frames;
+ OwnPtrWillBeRawPtr<KeyframeEffectModel::KeyframeVector> frames = adoptPtrWillBeNoop(new KeyframeEffectModel::KeyframeVector);
for (size_t i = 0; i < values.size(); i++) {
double offset = 1.0 / (values.size() - 1) * i;
RefPtr<AnimatableDouble> value = AnimatableDouble::create(values[i]);
- frames.append(createReplaceOpKeyframe(CSSPropertyOpacity, value.get(), offset).get());
+ frames->append(createReplaceOpKeyframe(CSSPropertyOpacity, value.get(), offset).get());
}
- return frames;
+ return frames.release();
}
PassRefPtrWillBeRawPtr<KeyframeEffectModel> createKeyframeEffectModel(PassRefPtrWillBeRawPtr<Keyframe> prpFrom, PassRefPtrWillBeRawPtr<Keyframe> prpTo, PassRefPtrWillBeRawPtr<Keyframe> prpC = nullptr, PassRefPtrWillBeRawPtr<Keyframe> prpD = nullptr)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698