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

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

Issue 1341673002: Web Animations: Don't participate in grouping when start time is set (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Don't use 0 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 | « 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: Source/core/animation/CompositorPendingAnimations.cpp
diff --git a/Source/core/animation/CompositorPendingAnimations.cpp b/Source/core/animation/CompositorPendingAnimations.cpp
index 06c0fd0c8c23e5c481deb94c3979575afdd2a711..28ee306a8579feb2980ecd42c562e05bc598b356 100644
--- a/Source/core/animation/CompositorPendingAnimations.cpp
+++ b/Source/core/animation/CompositorPendingAnimations.cpp
@@ -65,14 +65,17 @@ bool CompositorPendingAnimations::update(bool startOnCompositor)
HeapVector<Member<Animation>> deferred;
animations.swap(m_pending);
int compositorGroup = ++m_compositorGroup;
- if (compositorGroup == 0) {
- // Wrap around, skipping 0.
+ while (compositorGroup == 0 || compositorGroup == 1) {
alancutter (OOO until 2018) 2015/09/16 05:35:30 Nit: We should use an enum instead of magic number
+ // 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();
- if (animation->preCommit(compositorGroup, startOnCompositor)) {
+ // Animations with a start time do not participate in compositor start-time grouping.
+ if (animation->preCommit(animation->hasStartTime() ? 1 : compositorGroup, startOnCompositor)) {
if (animation->hasActiveAnimationsOnCompositor() && !hadCompositorAnimation) {
startedSynchronizedOnCompositor = true;
}
« no previous file with comments | « 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