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

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

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
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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 void DocumentTimeline::dispatchEvents() 150 void DocumentTimeline::dispatchEvents()
151 { 151 {
152 Vector<EventToDispatch> events = m_events; 152 Vector<EventToDispatch> events = m_events;
153 m_events.clear(); 153 m_events.clear();
154 for (size_t i = 0; i < events.size(); i++) 154 for (size_t i = 0; i < events.size(); i++)
155 events[i].target->dispatchEvent(events[i].event.release()); 155 events[i].target->dispatchEvent(events[i].event.release());
156 } 156 }
157 157
158 size_t DocumentTimeline::numberOfActiveAnimationsForTesting() const 158 size_t DocumentTimeline::numberOfActiveAnimationsForTesting() const
159 { 159 {
160 if (isNull(m_zeroTime))
161 return 0;
160 // Includes all players whose directly associated timed items 162 // Includes all players whose directly associated timed items
161 // are current or in effect. 163 // are current or in effect.
162 if (isNull(m_zeroTime)) 164 if (isNull(m_zeroTime))
163 return 0; 165 return 0;
164 size_t count = 0; 166 size_t count = 0;
165 for (size_t i = 0; i < m_players.size(); ++i) { 167 for (size_t i = 0; i < m_players.size(); ++i) {
166 const TimedItem* timedItem = m_players[i]->source(); 168 const TimedItem* timedItem = m_players[i]->source();
167 count += (timedItem && (timedItem->isCurrent() || timedItem->isInEffect( ))); 169 if (m_players[i]->hasStartTime())
170 count += (timedItem && (timedItem->isCurrent() || timedItem->isInEff ect()));
168 } 171 }
169 return count; 172 return count;
170 } 173 }
171 174
172 } // namespace 175 } // namespace
OLDNEW
« no previous file with comments | « Source/core/animation/DocumentTimeline.h ('k') | Source/core/animation/KeyframeAnimationEffect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698