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

Side by Side Diff: Source/core/animation/ElementAnimations.cpp

Issue 1218943002: Compositor animations for Independent CSS Transform Properties (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Clean up Created 5 years, 5 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
« no previous file with comments | « Source/core/animation/DocumentAnimations.cpp ('k') | Source/core/animation/KeyframeEffect.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 { 53 {
54 for (const auto& entry : m_animations) { 54 for (const auto& entry : m_animations) {
55 const Animation& animation = *entry.key; 55 const Animation& animation = *entry.key;
56 ASSERT(animation.source()); 56 ASSERT(animation.source());
57 // FIXME: Needs to consider AnimationGroup once added. 57 // FIXME: Needs to consider AnimationGroup once added.
58 ASSERT(animation.source()->isAnimation()); 58 ASSERT(animation.source()->isAnimation());
59 const KeyframeEffect& effect = *toKeyframeEffect(animation.source()); 59 const KeyframeEffect& effect = *toKeyframeEffect(animation.source());
60 if (effect.isCurrent()) { 60 if (effect.isCurrent()) {
61 if (effect.affects(PropertyHandle(CSSPropertyOpacity))) 61 if (effect.affects(PropertyHandle(CSSPropertyOpacity)))
62 style.setHasCurrentOpacityAnimation(true); 62 style.setHasCurrentOpacityAnimation(true);
63 if (effect.affects(PropertyHandle(CSSPropertyTransform))) 63 if (effect.affects(PropertyHandle(CSSPropertyTransform))
Eric Willigers 2015/07/06 06:03:28 [Optional] Can we call isTransformRelatedEffect?
soonm 2015/07/06 23:36:50 Done - Yep that seems sound since the function onl
soonm 2015/07/06 23:36:50 Yep that seems sound since the function only deals
64 || effect.affects(PropertyHandle(CSSPropertyRotate))
65 || effect.affects(PropertyHandle(CSSPropertyScale))
66 || effect.affects(PropertyHandle(CSSPropertyTranslate)))
64 style.setHasCurrentTransformAnimation(true); 67 style.setHasCurrentTransformAnimation(true);
65 if (effect.affects(PropertyHandle(CSSPropertyWebkitFilter))) 68 if (effect.affects(PropertyHandle(CSSPropertyWebkitFilter)))
66 style.setHasCurrentFilterAnimation(true); 69 style.setHasCurrentFilterAnimation(true);
67 } 70 }
68 } 71 }
69 72
70 if (style.hasCurrentOpacityAnimation()) 73 if (style.hasCurrentOpacityAnimation())
71 style.setIsRunningOpacityAnimationOnCompositor(m_defaultStack.hasActiveA nimationsOnCompositor(CSSPropertyOpacity)); 74 style.setIsRunningOpacityAnimationOnCompositor(m_defaultStack.hasActiveA nimationsOnCompositor(CSSPropertyOpacity));
72 if (style.hasCurrentTransformAnimation()) 75 if (style.hasCurrentTransformAnimation())
73 style.setIsRunningTransformAnimationOnCompositor(m_defaultStack.hasActiv eAnimationsOnCompositor(CSSPropertyTransform)); 76 style.setIsRunningTransformAnimationOnCompositor(m_defaultStack.hasActiv eAnimationsOnCompositor(CSSPropertyTransform));
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 // TODO(rune@opera.com): The FontFaceCache version number may be increased w ithout forcing 125 // TODO(rune@opera.com): The FontFaceCache version number may be increased w ithout forcing
123 // a style recalc (see crbug.com/471079). ComputedStyle objects created with different cache 126 // a style recalc (see crbug.com/471079). ComputedStyle objects created with different cache
124 // versions will not be considered equal as Font::operator== will compare ve rsions, hence 127 // versions will not be considered equal as Font::operator== will compare ve rsions, hence
125 // ComputedStyle::operator== will return false. We avoid using baseComputedS tyle (the check for 128 // ComputedStyle::operator== will return false. We avoid using baseComputedS tyle (the check for
126 // isFallbackValid()) in that case to avoid triggering the ComputedStyle com parison ASSERT 129 // isFallbackValid()) in that case to avoid triggering the ComputedStyle com parison ASSERT
127 // in updateBaseComputedStyle. 130 // in updateBaseComputedStyle.
128 return m_animationStyleChange && (!m_baseComputedStyle || m_baseComputedStyl e->font().isFallbackValid()); 131 return m_animationStyleChange && (!m_baseComputedStyle || m_baseComputedStyl e->font().isFallbackValid());
129 } 132 }
130 133
131 } // namespace blink 134 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/animation/DocumentAnimations.cpp ('k') | Source/core/animation/KeyframeEffect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698