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

Unified Diff: Source/core/rendering/CompositedLayerMapping.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/rendering/CompositedLayerMapping.cpp
diff --git a/Source/core/rendering/CompositedLayerMapping.cpp b/Source/core/rendering/CompositedLayerMapping.cpp
index 712f29ef5422befe02dd49a23fa0a8935c6bf0a7..2f605d1f4f7ea65ac1af51ae0998fe12f4966c5a 100644
--- a/Source/core/rendering/CompositedLayerMapping.cpp
+++ b/Source/core/rendering/CompositedLayerMapping.cpp
@@ -30,6 +30,7 @@
#include "CSSPropertyNames.h"
#include "HTMLNames.h"
#include "RuntimeEnabledFeatures.h"
+#include "core/animation/ActiveAnimations.h"
#include "core/fetch/ImageResource.h"
#include "core/html/HTMLIFrameElement.h"
#include "core/html/HTMLMediaElement.h"
@@ -520,11 +521,11 @@ void CompositedLayerMapping::updateGraphicsLayerGeometry()
// Set transform property, if it is not animating. We have to do this here because the transform
// is affected by the layer dimensions.
- if (!renderer()->animation().isRunningAcceleratedAnimationOnRenderer(renderer(), CSSPropertyWebkitTransform))
+ if (!isRunningCompositorAnimation(*renderer(), CSSPropertyWebkitTransform))
updateTransform(renderer()->style());
// Set opacity, if it is not animating.
- if (!renderer()->animation().isRunningAcceleratedAnimationOnRenderer(renderer(), CSSPropertyOpacity))
+ if (!isRunningCompositorAnimation(*renderer(), CSSPropertyOpacity))
updateOpacity(renderer()->style());
if (RuntimeEnabledFeatures::cssCompositingEnabled())
@@ -1926,7 +1927,10 @@ void CompositedLayerMapping::transitionFinished(CSSPropertyID property)
void CompositedLayerMapping::notifyAnimationStarted(const GraphicsLayer*, double time)
{
- renderer()->animation().notifyAnimationStarted(renderer(), time);
+ if (RuntimeEnabledFeatures::webAnimationsEnabled())
+ renderer()->node()->document().cssPendingAnimations().notifyCompositorAnimationStarted(monotonicallyIncreasingTime() - (currentTime() - time));
+ else
+ renderer()->animation().notifyAnimationStarted(renderer(), time);
shans 2013/11/18 01:02:06 (Not required for this CL): I think we need to dra
dstockwell 2013/11/18 05:30:34 Will do, but I think we should move as much as we
}
IntRect CompositedLayerMapping::compositedBounds() const

Powered by Google App Engine
This is Rietveld 408576698