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

Side by Side Diff: Source/core/frame/animation/ImplicitAnimation.cpp

Issue 27030009: Revert "Make compositingState explicit (re-land #2 with bogus ASSERT removed)" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix build error 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 void ImplicitAnimation::getAnimatedStyle(RefPtr<RenderStyle>& animatedStyle) 97 void ImplicitAnimation::getAnimatedStyle(RefPtr<RenderStyle>& animatedStyle)
98 { 98 {
99 if (!animatedStyle) 99 if (!animatedStyle)
100 animatedStyle = RenderStyle::clone(m_toStyle.get()); 100 animatedStyle = RenderStyle::clone(m_toStyle.get());
101 101
102 CSSPropertyAnimation::blendProperties(this, m_animatingProperty, animatedSty le.get(), m_fromStyle.get(), m_toStyle.get(), progress(1, 0, 0)); 102 CSSPropertyAnimation::blendProperties(this, m_animatingProperty, animatedSty le.get(), m_fromStyle.get(), m_toStyle.get(), progress(1, 0, 0));
103 } 103 }
104 104
105 void ImplicitAnimation::startAnimation(double timeOffset) 105 void ImplicitAnimation::startAnimation(double timeOffset)
106 { 106 {
107 if (m_object && m_object->compositingState() == PaintsIntoOwnBacking) 107 if (m_object && m_object->isComposited())
108 m_isAccelerated = toRenderBoxModelObject(m_object)->startTransition(time Offset, m_animatingProperty, m_fromStyle.get(), m_toStyle.get()); 108 m_isAccelerated = toRenderBoxModelObject(m_object)->startTransition(time Offset, m_animatingProperty, m_fromStyle.get(), m_toStyle.get());
109 } 109 }
110 110
111 void ImplicitAnimation::pauseAnimation(double timeOffset) 111 void ImplicitAnimation::pauseAnimation(double timeOffset)
112 { 112 {
113 if (!m_object) 113 if (!m_object)
114 return; 114 return;
115 115
116 if (m_object && m_object->compositingState() == PaintsIntoOwnBacking && isAc celerated()) 116 if (m_object && m_object->isComposited() && isAccelerated())
117 toRenderBoxModelObject(m_object)->transitionPaused(timeOffset, m_animati ngProperty); 117 toRenderBoxModelObject(m_object)->transitionPaused(timeOffset, m_animati ngProperty);
118 118
119 // Restore the original (unanimated) style 119 // Restore the original (unanimated) style
120 if (!paused()) 120 if (!paused())
121 setNeedsStyleRecalc(m_object->node()); 121 setNeedsStyleRecalc(m_object->node());
122 } 122 }
123 123
124 void ImplicitAnimation::endAnimation() 124 void ImplicitAnimation::endAnimation()
125 { 125 {
126 if (m_object && m_object->compositingState() == PaintsIntoOwnBacking && isAc celerated()) 126 if (m_object && m_object->isComposited() && isAccelerated())
127 toRenderBoxModelObject(m_object)->transitionFinished(m_animatingProperty ); 127 toRenderBoxModelObject(m_object)->transitionFinished(m_animatingProperty );
128 m_isAccelerated = false; 128 m_isAccelerated = false;
129 } 129 }
130 130
131 void ImplicitAnimation::onAnimationEnd(double elapsedTime) 131 void ImplicitAnimation::onAnimationEnd(double elapsedTime)
132 { 132 {
133 // If we have a keyframe animation on this property, this transition is bein g overridden. The keyframe 133 // If we have a keyframe animation on this property, this transition is bein g overridden. The keyframe
134 // animation keeps an unanimated style in case a transition starts while the keyframe animation is 134 // animation keeps an unanimated style in case a transition starts while the keyframe animation is
135 // running. But now that the transition has completed, we need to update thi s style with its new 135 // running. But now that the transition has completed, we need to update thi s style with its new
136 // destination. If we didn't, the next time through we would think a transit ion had started 136 // destination. If we didn't, the next time through we would think a transit ion had started
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 // only need service at the end of the transition. 281 // only need service at the end of the transition.
282 if (CSSPropertyAnimation::animationOfPropertyIsAccelerated(m_animatingProper ty) && isAccelerated()) { 282 if (CSSPropertyAnimation::animationOfPropertyIsAccelerated(m_animatingProper ty) && isAccelerated()) {
283 bool isLooping; 283 bool isLooping;
284 getTimeToNextEvent(t, isLooping); 284 getTimeToNextEvent(t, isLooping);
285 } 285 }
286 286
287 return t; 287 return t;
288 } 288 }
289 289
290 } // namespace WebCore 290 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/frame/animation/AnimationBase.cpp ('k') | Source/core/frame/animation/KeyframeAnimation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698