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

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: Rebase and rename hasActiveAnimationOnCompositor to hasActiveAnimationsOnCompositor 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
« no previous file with comments | « Source/core/frame/FrameView.cpp ('k') | Source/core/rendering/RenderLayer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/CompositedLayerMapping.cpp
diff --git a/Source/core/rendering/CompositedLayerMapping.cpp b/Source/core/rendering/CompositedLayerMapping.cpp
index 712f29ef5422befe02dd49a23fa0a8935c6bf0a7..68783fbfaf5dd31abac1a4b9d90835c14a2fd66a 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,15 @@ 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 (RuntimeEnabledFeatures::webAnimationsCSSEnabled()
+ ? !hasActiveAnimationsOnCompositor(*renderer(), CSSPropertyWebkitTransform)
+ : !renderer()->animation().isRunningAcceleratedAnimationOnRenderer(renderer(), CSSPropertyWebkitTransform))
updateTransform(renderer()->style());
// Set opacity, if it is not animating.
- if (!renderer()->animation().isRunningAcceleratedAnimationOnRenderer(renderer(), CSSPropertyOpacity))
+ if (RuntimeEnabledFeatures::webAnimationsCSSEnabled()
+ ? !hasActiveAnimationsOnCompositor(*renderer(), CSSPropertyOpacity)
+ : !renderer()->animation().isRunningAcceleratedAnimationOnRenderer(renderer(), CSSPropertyOpacity))
updateOpacity(renderer()->style());
if (RuntimeEnabledFeatures::cssCompositingEnabled())
@@ -1926,7 +1931,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);
}
IntRect CompositedLayerMapping::compositedBounds() const
« no previous file with comments | « Source/core/frame/FrameView.cpp ('k') | Source/core/rendering/RenderLayer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698