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

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

Issue 955303002: Web Animations: Remove AnimationPlayer discarding logic (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: don't actually delete unit test Created 5 years, 10 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/SampledEffect.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/SampledEffect.cpp
diff --git a/Source/core/animation/SampledEffect.cpp b/Source/core/animation/SampledEffect.cpp
index b57235af5d6c3d6795c4cabca19d8aa92b6eb3f4..e950fb59ffe9bca232d62e68229a701991d6a3d5 100644
--- a/Source/core/animation/SampledEffect.cpp
+++ b/Source/core/animation/SampledEffect.cpp
@@ -11,9 +11,7 @@ namespace blink {
SampledEffect::SampledEffect(Animation* animation, PassOwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation> > > interpolations)
: m_animation(animation)
-#if !ENABLE(OILPAN)
, m_player(animation->player())
-#endif
, m_interpolations(interpolations)
, m_sequenceNumber(animation->player()->sequenceNumber())
, m_priority(animation->priority())
@@ -21,40 +19,13 @@ SampledEffect::SampledEffect(Animation* animation, PassOwnPtrWillBeRawPtr<WillBe
ASSERT(m_interpolations && !m_interpolations->isEmpty());
}
-bool SampledEffect::canChange() const
-{
-#if ENABLE(OILPAN)
- return m_animation;
-#else
- if (!m_animation)
- return false;
- // FIXME: This check won't be needed when Animation and AnimationPlayer are moved to Oilpan.
- return !m_player->canFree();
-#endif
-}
-
void SampledEffect::clear()
{
-#if !ENABLE(OILPAN)
m_player = nullptr;
-#endif
m_animation = nullptr;
m_interpolations->clear();
}
-void SampledEffect::removeReplacedInterpolationsIfNeeded(const BitArray<numCSSProperties>& replacedProperties)
-{
- if (canChange() && m_animation->isCurrent())
- return;
-
- size_t dest = 0;
- for (auto& interpolation : *m_interpolations) {
- if (!replacedProperties.get(toStyleInterpolation(interpolation.get())->id()))
- m_interpolations->at(dest++) = interpolation;
- }
- m_interpolations->shrink(dest);
-}
-
DEFINE_TRACE(SampledEffect)
{
visitor->trace(m_animation);
« no previous file with comments | « Source/core/animation/SampledEffect.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698