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

Side by Side Diff: Source/core/frame/animation/KeyframeAnimation.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, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2012 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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 } 232 }
233 } 233 }
234 234
235 bool KeyframeAnimation::hasAnimationForProperty(CSSPropertyID property) const 235 bool KeyframeAnimation::hasAnimationForProperty(CSSPropertyID property) const
236 { 236 {
237 return m_keyframes.containsProperty(property); 237 return m_keyframes.containsProperty(property);
238 } 238 }
239 239
240 void KeyframeAnimation::startAnimation(double timeOffset) 240 void KeyframeAnimation::startAnimation(double timeOffset)
241 { 241 {
242 if (m_object && m_object->compositingState() == PaintsIntoOwnBacking) 242 if (m_object && m_object->isComposited())
243 m_isAccelerated = toRenderBoxModelObject(m_object)->startAnimation(timeO ffset, m_animation.get(), m_keyframes); 243 m_isAccelerated = toRenderBoxModelObject(m_object)->startAnimation(timeO ffset, m_animation.get(), m_keyframes);
244 } 244 }
245 245
246 void KeyframeAnimation::pauseAnimation(double timeOffset) 246 void KeyframeAnimation::pauseAnimation(double timeOffset)
247 { 247 {
248 if (!m_object) 248 if (!m_object)
249 return; 249 return;
250 250
251 if (m_object && m_object->compositingState() == PaintsIntoOwnBacking && isAc celerated()) 251 if (m_object && m_object->isComposited() && isAccelerated())
252 toRenderBoxModelObject(m_object)->animationPaused(timeOffset, m_keyframe s.animationName()); 252 toRenderBoxModelObject(m_object)->animationPaused(timeOffset, m_keyframe s.animationName());
253 253
254 // Restore the original (unanimated) style 254 // Restore the original (unanimated) style
255 if (!paused()) 255 if (!paused())
256 setNeedsStyleRecalc(m_object->node()); 256 setNeedsStyleRecalc(m_object->node());
257 } 257 }
258 258
259 void KeyframeAnimation::endAnimation() 259 void KeyframeAnimation::endAnimation()
260 { 260 {
261 if (!m_object) 261 if (!m_object)
262 return; 262 return;
263 263
264 if (m_object && m_object->compositingState() == PaintsIntoOwnBacking && isAc celerated()) 264 if (m_object && m_object->isComposited() && isAccelerated())
265 toRenderBoxModelObject(m_object)->animationFinished(m_keyframes.animatio nName()); 265 toRenderBoxModelObject(m_object)->animationFinished(m_keyframes.animatio nName());
266 m_isAccelerated = false; 266 m_isAccelerated = false;
267 267
268 // Restore the original (unanimated) style 268 // Restore the original (unanimated) style
269 if (!paused()) 269 if (!paused())
270 setNeedsStyleRecalc(m_object->node()); 270 setNeedsStyleRecalc(m_object->node());
271 } 271 }
272 272
273 bool KeyframeAnimation::shouldSendEventForListener(Document::ListenerType listen erType) const 273 bool KeyframeAnimation::shouldSendEventForListener(Document::ListenerType listen erType) const
274 { 274 {
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 452
453 if (acceleratedPropertiesOnly) { 453 if (acceleratedPropertiesOnly) {
454 bool isLooping; 454 bool isLooping;
455 getTimeToNextEvent(t, isLooping); 455 getTimeToNextEvent(t, isLooping);
456 } 456 }
457 457
458 return t; 458 return t;
459 } 459 }
460 460
461 } // namespace WebCore 461 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/frame/animation/ImplicitAnimation.cpp ('k') | Source/core/inspector/InspectorLayerTreeAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698