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

Unified Diff: Source/core/animation/css/CSSPendingAnimations.cpp

Issue 135693003: Defer starting of animations until after compositing update (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Reland after fixing flaky tests. Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/animation/css/CSSPendingAnimations.h ('k') | Source/core/core.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/css/CSSPendingAnimations.cpp
diff --git a/Source/core/animation/css/CSSPendingAnimations.cpp b/Source/core/animation/css/CSSPendingAnimations.cpp
index eac01ad63e92e40fb9a85025b31055a8a511189d..d4ca6f4e792de05fdd277069db6e2621d206e2dc 100644
--- a/Source/core/animation/css/CSSPendingAnimations.cpp
+++ b/Source/core/animation/css/CSSPendingAnimations.cpp
@@ -41,22 +41,14 @@ namespace WebCore {
void CSSPendingAnimations::add(Player* player)
{
ASSERT(player->source()->isAnimation());
- // The actual start time is either this value, or the time that
- // this animation, or an animation that it is synchronized with
- // is started on the compositor.
- const double defaultStartTime = player->timeline()->currentTime();
- m_pending.append(std::make_pair(player, defaultStartTime));
+ m_pending.append(player);
}
bool CSSPendingAnimations::startPendingAnimations()
{
- // FIXME: This is called from within style recalc, at which point compositor state is not up to date.
- // https://code.google.com/p/chromium/issues/detail?id=339847
- DisableCompositingQueryAsserts disabler;
-
bool startedOnCompositor = false;
for (size_t i = 0; i < m_pending.size(); ++i) {
- if (m_pending[i].first->maybeStartAnimationOnCompositor())
+ if (m_pending[i]->maybeStartAnimationOnCompositor())
startedOnCompositor = true;
}
@@ -65,11 +57,11 @@ bool CSSPendingAnimations::startPendingAnimations()
// start immediately.
if (startedOnCompositor) {
for (size_t i = 0; i < m_pending.size(); ++i)
- m_waitingForCompositorAnimationStart.append(m_pending[i].first);
+ m_waitingForCompositorAnimationStart.append(m_pending[i]);
} else {
for (size_t i = 0; i < m_pending.size(); ++i) {
- m_pending[i].first->setStartTime(m_pending[i].second);
- m_pending[i].first->update();
+ m_pending[i]->setStartTime(m_pending[i]->timeline()->currentTime());
+ m_pending[i]->update();
}
}
m_pending.clear();
« no previous file with comments | « Source/core/animation/css/CSSPendingAnimations.h ('k') | Source/core/core.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698