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

Side by Side Diff: Source/core/animation/css/CSSAnimations.cpp

Issue 211113002: Oilpan: Move CSSAnimations and CSSAnimationUpdate to oilpan's heap (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 if (stack.isEmpty()) 313 if (stack.isEmpty())
314 return 0; 314 return 0;
315 315
316 for (size_t i = 0; i < stack.size(); ++i) { 316 for (size_t i = 0; i < stack.size(); ++i) {
317 if (const StyleRuleKeyframes* keyframesRule = stack.at(i)->keyframeStyle sForAnimation(animationName)) 317 if (const StyleRuleKeyframes* keyframesRule = stack.at(i)->keyframeStyle sForAnimation(animationName))
318 return keyframesRule; 318 return keyframesRule;
319 } 319 }
320 return 0; 320 return 0;
321 } 321 }
322 322
323 PassOwnPtr<CSSAnimationUpdate> CSSAnimations::calculateUpdate(Element* element, const Element& parentElement, const RenderStyle& style, RenderStyle* parentStyle , StyleResolver* resolver) 323 PassOwnPtrWillBeRawPtr<CSSAnimationUpdate> CSSAnimations::calculateUpdate(Elemen t* element, const Element& parentElement, const RenderStyle& style, RenderStyle* parentStyle, StyleResolver* resolver)
324 { 324 {
325 OwnPtr<CSSAnimationUpdate> update = adoptPtr(new CSSAnimationUpdate()); 325 OwnPtrWillBeRawPtr<CSSAnimationUpdate> update = adoptPtrWillBeNoop(new CSSAn imationUpdate());
326 calculateAnimationUpdate(update.get(), element, parentElement, style, parent Style, resolver); 326 calculateAnimationUpdate(update.get(), element, parentElement, style, parent Style, resolver);
327 calculateAnimationActiveInterpolations(update.get(), element); 327 calculateAnimationActiveInterpolations(update.get(), element);
328 calculateTransitionUpdate(update.get(), element, style); 328 calculateTransitionUpdate(update.get(), element, style);
329 calculateTransitionActiveInterpolations(update.get(), element); 329 calculateTransitionActiveInterpolations(update.get(), element);
330 return update->isEmpty() ? nullptr : update.release(); 330 return update->isEmpty() ? nullptr : update.release();
331 } 331 }
332 332
333 void CSSAnimations::calculateAnimationUpdate(CSSAnimationUpdate* update, Element * element, const Element& parentElement, const RenderStyle& style, RenderStyle* parentStyle, StyleResolver* resolver) 333 void CSSAnimations::calculateAnimationUpdate(CSSAnimationUpdate* update, Element * element, const Element& parentElement, const RenderStyle& style, RenderStyle* parentStyle, StyleResolver* resolver)
334 { 334 {
335 const ActiveAnimations* activeAnimations = element ? element->activeAnimatio ns() : 0; 335 const ActiveAnimations* activeAnimations = element ? element->activeAnimatio ns() : 0;
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 } 405 }
406 } 406 }
407 407
408 void CSSAnimations::maybeApplyPendingUpdate(Element* element) 408 void CSSAnimations::maybeApplyPendingUpdate(Element* element)
409 { 409 {
410 if (!m_pendingUpdate) { 410 if (!m_pendingUpdate) {
411 m_previousActiveInterpolationsForAnimations.clear(); 411 m_previousActiveInterpolationsForAnimations.clear();
412 return; 412 return;
413 } 413 }
414 414
415 OwnPtr<CSSAnimationUpdate> update = m_pendingUpdate.release(); 415 OwnPtrWillBeRawPtr<CSSAnimationUpdate> update = m_pendingUpdate.release();
416 416
417 m_previousActiveInterpolationsForAnimations.swap(update->activeInterpolation sForAnimations()); 417 m_previousActiveInterpolationsForAnimations.swap(update->activeInterpolation sForAnimations());
418 418
419 // FIXME: cancelling, pausing, unpausing animations all query compositingSta te, which is not necessarily up to date here 419 // FIXME: cancelling, pausing, unpausing animations all query compositingSta te, which is not necessarily up to date here
420 // since we call this from recalc style. 420 // since we call this from recalc style.
421 // https://code.google.com/p/chromium/issues/detail?id=339847 421 // https://code.google.com/p/chromium/issues/detail?id=339847
422 DisableCompositingQueryAsserts disabler; 422 DisableCompositingQueryAsserts disabler;
423 423
424 for (Vector<AtomicString>::const_iterator iter = update->cancelledAnimationN ames().begin(); iter != update->cancelledAnimationNames().end(); ++iter) { 424 for (Vector<AtomicString>::const_iterator iter = update->cancelledAnimationN ames().begin(); iter != update->cancelledAnimationNames().end(); ++iter) {
425 const HashSet<RefPtr<AnimationPlayer> >& players = m_animations.take(*it er); 425 const HashSet<RefPtr<AnimationPlayer> >& players = m_animations.take(*it er);
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
889 for (int i = firstCSSProperty; i < lastCSSProperty; ++i) { 889 for (int i = firstCSSProperty; i < lastCSSProperty; ++i) {
890 CSSPropertyID id = convertToCSSPropertyID(i); 890 CSSPropertyID id = convertToCSSPropertyID(i);
891 if (isAnimatableProperty(id)) 891 if (isAnimatableProperty(id))
892 properties.append(id); 892 properties.append(id);
893 } 893 }
894 propertyShorthand = StylePropertyShorthand(CSSPropertyInvalid, propertie s.begin(), properties.size()); 894 propertyShorthand = StylePropertyShorthand(CSSPropertyInvalid, propertie s.begin(), properties.size());
895 } 895 }
896 return propertyShorthand; 896 return propertyShorthand;
897 } 897 }
898 898
899 void CSSAnimations::trace(Visitor* visitor)
900 {
901 visitor->trace(m_transitions);
902 visitor->trace(m_pendingUpdate);
903 visitor->trace(m_previousActiveInterpolationsForAnimations);
904 }
905
906 void CSSAnimationUpdate::trace(Visitor* visitor)
907 {
908 visitor->trace(m_newTransitions);
909 visitor->trace(m_activeInterpolationsForAnimations);
910 visitor->trace(m_activeInterpolationsForTransitions);
911 }
912
899 } // namespace WebCore 913 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/animation/css/CSSAnimations.h ('k') | Source/core/css/resolver/StyleResolverState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698