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

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

Issue 23455058: WIP: WebLayer::addAnimation should transfer the ownership of WebAnimation instance. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Improve WebPassOwnPtr so that it is hard to make a mistake. 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
« no previous file with comments | « Source/core/platform/graphics/GraphicsLayer.cpp ('k') | Source/web/LinkHighlight.h » ('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 848ce8031cc3f76c92673dd5fbc596bfc9a6b84e..78fd280f115f58bc6845c31cd9c225389d89f9db 100644
--- a/Source/core/rendering/CompositedLayerMapping.cpp
+++ b/Source/core/rendering/CompositedLayerMapping.cpp
@@ -1785,18 +1785,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;
@@ -1837,17 +1837,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.
« no previous file with comments | « Source/core/platform/graphics/GraphicsLayer.cpp ('k') | Source/web/LinkHighlight.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698