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

Unified Diff: Source/core/rendering/CompositedLayerMapping.cpp

Issue 23834010: Change WebLayer::addAnimation to transfer ownership of WebAnimation. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Pass ownership of WebAnimation under ANIMATION_OWNERSHIP_NOT_TRANSFER guard. Created 7 years, 2 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
Index: Source/core/rendering/CompositedLayerMapping.cpp
diff --git a/Source/core/rendering/CompositedLayerMapping.cpp b/Source/core/rendering/CompositedLayerMapping.cpp
index ebebd7c29b90b4ee8a26d4ea285308758cf67ba9..4da4286497182dc660b29234cc81e4cd536c661a 100644
--- a/Source/core/rendering/CompositedLayerMapping.cpp
+++ b/Source/core/rendering/CompositedLayerMapping.cpp
@@ -1794,18 +1794,18 @@ bool CompositedLayerMapping::startAnimation(double timeOffset, const CSSAnimatio
// GraphicsLayer rejects any property of the animation, we have to remove the
// animation and return false to indicate un-accelerated animation is required.
if (hasTransform) {
- if (!animations.m_transformAnimation || !m_graphicsLayer->addAnimation(animations.m_transformAnimation.get()))
+ if (!animations.m_transformAnimation || !m_graphicsLayer->addAnimation(animations.m_transformAnimation.release()))
return false;
}
if (hasOpacity) {
- if (!animations.m_opacityAnimation || !m_graphicsLayer->addAnimation(animations.m_opacityAnimation.get())) {
+ if (!animations.m_opacityAnimation || !m_graphicsLayer->addAnimation(animations.m_opacityAnimation.release())) {
if (hasTransform)
m_graphicsLayer->removeAnimation(animationId);
return false;
}
}
if (hasFilter) {
- if (!animations.m_filterAnimation || !m_graphicsLayer->addAnimation(animations.m_filterAnimation.get())) {
+ if (!animations.m_filterAnimation || !m_graphicsLayer->addAnimation(animations.m_filterAnimation.release())) {
if (hasTransform || hasOpacity)
m_graphicsLayer->removeAnimation(animationId);
return false;
@@ -1846,17 +1846,17 @@ bool CompositedLayerMapping::startTransition(double timeOffset, CSSPropertyID pr
// Although KeyframeAnimation can have multiple properties of the animation, ImplicitAnimation (= Transition) has only one animation property.
WebAnimations animations(m_animationProvider->startTransition(timeOffset, property, fromStyle,
toStyle, m_owningLayer->hasTransform(), m_owningLayer->hasFilter(), boxSize, fromOpacity, toOpacity));
- if (animations.m_transformAnimation && m_graphicsLayer->addAnimation(animations.m_transformAnimation.get())) {
+ if (animations.m_transformAnimation && m_graphicsLayer->addAnimation(animations.m_transformAnimation.release())) {
// To ensure that the correct transform is visible when the animation ends, also set the final transform.
updateTransform(toStyle);
return true;
}
- if (animations.m_opacityAnimation && m_graphicsLayer->addAnimation(animations.m_opacityAnimation.get())) {
+ if (animations.m_opacityAnimation && m_graphicsLayer->addAnimation(animations.m_opacityAnimation.release())) {
// To ensure that the correct opacity is visible when the animation ends, also set the final opacity.
updateOpacity(toStyle);
return true;
}
- if (animations.m_filterAnimation && m_graphicsLayer->addAnimation(animations.m_filterAnimation.get())) {
+ if (animations.m_filterAnimation && m_graphicsLayer->addAnimation(animations.m_filterAnimation.release())) {
// To ensure that the correct filter is visible when the animation ends, also set the final filter.
updateFilters(toStyle);
ASSERT_NOT_REACHED(); // Chromium compositor cannot accelerate filter yet.

Powered by Google App Engine
This is Rietveld 408576698