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

Unified Diff: Source/core/frame/animation/AnimationController.cpp

Issue 23874019: Web Animations CSS: Start running animations on the compositor (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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
Index: Source/core/frame/animation/AnimationController.cpp
diff --git a/Source/core/frame/animation/AnimationController.cpp b/Source/core/frame/animation/AnimationController.cpp
index 8521e139a08ee89ddf419b11a46af630f1d36c3d..3b674e57c5607a3a2b440970dadb73e36666d49f 100644
--- a/Source/core/frame/animation/AnimationController.cpp
+++ b/Source/core/frame/animation/AnimationController.cpp
@@ -256,18 +256,18 @@ void AnimationControllerPrivate::animationTimerFired(Timer<AnimationControllerPr
serviceAnimations();
}
-bool AnimationControllerPrivate::isRunningAnimationOnRenderer(RenderObject* renderer, CSSPropertyID property, bool isRunningNow) const
+bool AnimationControllerPrivate::isRunningAnimationOnRenderer(const RenderObject* renderer, CSSPropertyID property, bool isRunningNow) const
{
- RefPtr<CompositeAnimation> animation = m_compositeAnimations.get(renderer);
+ RefPtr<CompositeAnimation> animation = m_compositeAnimations.get(const_cast<RenderObject*>(renderer));
if (!animation)
return false;
return animation->isAnimatingProperty(property, false, isRunningNow);
}
-bool AnimationControllerPrivate::isRunningAcceleratableAnimationOnRenderer(RenderObject *renderer) const
+bool AnimationControllerPrivate::isRunningAcceleratableAnimationOnRenderer(const RenderObject *renderer) const
{
- RefPtr<CompositeAnimation> animation = m_compositeAnimations.get(renderer);
+ RefPtr<CompositeAnimation> animation = m_compositeAnimations.get(const_cast<RenderObject*>(renderer));
if (!animation)
return false;
@@ -278,9 +278,9 @@ bool AnimationControllerPrivate::isRunningAcceleratableAnimationOnRenderer(Rende
|| animation->isAnimatingProperty(CSSPropertyWebkitFilter, acceleratedOnly, isRunningNow);
}
-bool AnimationControllerPrivate::isRunningAcceleratedAnimationOnRenderer(RenderObject* renderer, CSSPropertyID property, bool isRunningNow) const
+bool AnimationControllerPrivate::isRunningAcceleratedAnimationOnRenderer(const RenderObject* renderer, CSSPropertyID property, bool isRunningNow) const
{
- RefPtr<CompositeAnimation> animation = m_compositeAnimations.get(renderer);
+ RefPtr<CompositeAnimation> animation = m_compositeAnimations.get(const_cast<RenderObject*>(renderer));
if (!animation)
return false;
@@ -481,6 +481,7 @@ PassRefPtr<RenderStyle> AnimationController::updateAnimations(RenderObject& rend
PassRefPtr<RenderStyle> AnimationController::getAnimatedStyleForRenderer(RenderObject* renderer)
{
+ ASSERT(!RuntimeEnabledFeatures::webAnimationsCSSEnabled());
Steve Block 2013/11/18 05:03:03 Shouldn't we just assert in the constructor?
dstockwell 2013/11/18 05:30:34 I removed these for now. But I think this object i
return m_data->getAnimatedStyleForRenderer(renderer);
}
@@ -499,18 +500,21 @@ unsigned AnimationController::numberOfActiveAnimations(Document* document) const
return m_data->numberOfActiveAnimations(document);
}
-bool AnimationController::isRunningAnimationOnRenderer(RenderObject* renderer, CSSPropertyID property, bool isRunningNow) const
+bool AnimationController::isRunningAnimationOnRenderer(const RenderObject* renderer, CSSPropertyID property, bool isRunningNow) const
{
+ ASSERT(!RuntimeEnabledFeatures::webAnimationsCSSEnabled());
return m_data->isRunningAnimationOnRenderer(renderer, property, isRunningNow);
}
-bool AnimationController::isRunningAcceleratableAnimationOnRenderer(RenderObject* renderer) const
+bool AnimationController::isRunningAcceleratableAnimationOnRenderer(const RenderObject* renderer) const
{
+ ASSERT(!RuntimeEnabledFeatures::webAnimationsCSSEnabled());
return m_data->isRunningAcceleratableAnimationOnRenderer(renderer);
}
-bool AnimationController::isRunningAcceleratedAnimationOnRenderer(RenderObject* renderer, CSSPropertyID property, bool isRunningNow) const
+bool AnimationController::isRunningAcceleratedAnimationOnRenderer(const RenderObject* renderer, CSSPropertyID property, bool isRunningNow) const
{
+ ASSERT(!RuntimeEnabledFeatures::webAnimationsCSSEnabled());
return m_data->isRunningAcceleratedAnimationOnRenderer(renderer, property, isRunningNow);
}

Powered by Google App Engine
This is Rietveld 408576698