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

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

Issue 23874019: Web Animations CSS: Start running animations on the compositor (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase and rename hasActiveAnimationOnCompositor to hasActiveAnimationsOnCompositor Created 7 years, 1 month 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
« no previous file with comments | « Source/core/animation/TimedItem.h ('k') | Source/core/animation/css/CSSAnimations.cpp » ('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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 static bool isAnimatableProperty(CSSPropertyID); 157 static bool isAnimatableProperty(CSSPropertyID);
158 static const StylePropertyShorthand& animatableProperties(); 158 static const StylePropertyShorthand& animatableProperties();
159 // FIXME: This should take a const ScopedStyleTree instead of a StyleResolve r. 159 // FIXME: This should take a const ScopedStyleTree instead of a StyleResolve r.
160 // We should also change the Element* to a const Element* 160 // We should also change the Element* to a const Element*
161 static PassOwnPtr<CSSAnimationUpdate> calculateUpdate(Element*, const Render Style&, StyleResolver*); 161 static PassOwnPtr<CSSAnimationUpdate> calculateUpdate(Element*, const Render Style&, StyleResolver*);
162 162
163 void setPendingUpdate(PassOwnPtr<CSSAnimationUpdate> update) { m_pendingUpda te = update; } 163 void setPendingUpdate(PassOwnPtr<CSSAnimationUpdate> update) { m_pendingUpda te = update; }
164 void maybeApplyPendingUpdate(Element*); 164 void maybeApplyPendingUpdate(Element*);
165 bool isEmpty() const { return m_animations.isEmpty() && m_transitions.isEmpt y() && !m_pendingUpdate; } 165 bool isEmpty() const { return m_animations.isEmpty() && m_transitions.isEmpt y() && !m_pendingUpdate; }
166 void cancel(); 166 void cancel();
167
168 bool shouldCompositeForPendingAnimations(bool renderViewInCompositingMode) c onst;
169
167 private: 170 private:
168 // Note that a single animation name may map to multiple players due to 171 // Note that a single animation name may map to multiple players due to
169 // the way in which we split up animations with incomplete keyframes. 172 // the way in which we split up animations with incomplete keyframes.
170 // FIXME: Once the Web Animations model supports groups, we could use a 173 // FIXME: Once the Web Animations model supports groups, we could use a
171 // ParGroup to drive multiple animations from a single Player. 174 // ParGroup to drive multiple animations from a single Player.
172 typedef HashMap<AtomicString, HashSet<RefPtr<Player> > > AnimationMap; 175 typedef HashMap<AtomicString, HashSet<RefPtr<Player> > > AnimationMap;
173 struct RunningTransition { 176 struct RunningTransition {
174 Animation* transition; // The TransitionTimeline keeps the Players alive 177 Animation* transition; // The TransitionTimeline keeps the Players alive
175 const AnimatableValue* from; 178 const AnimatableValue* from;
176 const AnimatableValue* to; 179 const AnimatableValue* to;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 virtual void onEventCondition(const TimedItem*, bool isFirstSample, Time dItem::Phase previousPhase, double previousIteration) OVERRIDE; 216 virtual void onEventCondition(const TimedItem*, bool isFirstSample, Time dItem::Phase previousPhase, double previousIteration) OVERRIDE;
214 private: 217 private:
215 Element* m_target; 218 Element* m_target;
216 const CSSPropertyID m_property; 219 const CSSPropertyID m_property;
217 }; 220 };
218 }; 221 };
219 222
220 } // namespace WebCore 223 } // namespace WebCore
221 224
222 #endif 225 #endif
OLDNEW
« no previous file with comments | « Source/core/animation/TimedItem.h ('k') | Source/core/animation/css/CSSAnimations.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698