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

Unified Diff: third_party/WebKit/Source/core/animation/CompositorPendingAnimations.cpp

Issue 1374193002: Web Animations: Don't participate in grouping when start time is set (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2490
Patch Set: Created 5 years, 3 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 | « third_party/WebKit/LayoutTests/web-animations-api/start-time-grouping.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/animation/CompositorPendingAnimations.cpp
diff --git a/third_party/WebKit/Source/core/animation/CompositorPendingAnimations.cpp b/third_party/WebKit/Source/core/animation/CompositorPendingAnimations.cpp
index 896f13bdb8665857c46e51b11858b51c54395875..e9adf075a5ddf32de6ddc906e37a628fe5b16e65 100644
--- a/third_party/WebKit/Source/core/animation/CompositorPendingAnimations.cpp
+++ b/third_party/WebKit/Source/core/animation/CompositorPendingAnimations.cpp
@@ -64,14 +64,16 @@ bool CompositorPendingAnimations::update(bool startOnCompositor)
WillBeHeapVector<RefPtrWillBeMember<Animation>> animations;
animations.swap(m_pending);
int compositorGroup = ++m_compositorGroup;
- if (compositorGroup == 0) {
- // Wrap around, skipping 0.
+ while (compositorGroup == 0 || compositorGroup == 1) {
+ // Wrap around, skipping 0, 1.
+ // * 0 is reserved for automatic assignment
+ // * 1 is used for animations with a specified start time
compositorGroup = ++m_compositorGroup;
}
for (auto& animation : animations) {
bool hadCompositorAnimation = animation->hasActiveAnimationsOnCompositor();
- animation->preCommit(compositorGroup, startOnCompositor);
+ animation->preCommit(animation->hasStartTime() ? 1 : compositorGroup, startOnCompositor);
if (animation->hasActiveAnimationsOnCompositor() && !hadCompositorAnimation) {
startedSynchronizedOnCompositor = true;
}
« no previous file with comments | « third_party/WebKit/LayoutTests/web-animations-api/start-time-grouping.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698