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

Side by Side 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: Rebase 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « LayoutTests/web-animations-api/start-time-grouping.html ('k') | no next file » | 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 HeapVector<Member<Animation>> deferred; 65 HeapVector<Member<Animation>> deferred;
66 animations.swap(m_pending); 66 animations.swap(m_pending);
67 int compositorGroup = ++m_compositorGroup; 67 int compositorGroup = ++m_compositorGroup;
68 if (compositorGroup == 0) { 68 if (compositorGroup == 0) {
69 // Wrap around, skipping 0. 69 // Wrap around, skipping 0.
70 compositorGroup = ++m_compositorGroup; 70 compositorGroup = ++m_compositorGroup;
71 } 71 }
72 72
73 for (auto& animation : animations) { 73 for (auto& animation : animations) {
74 bool hadCompositorAnimation = animation->hasActiveAnimationsOnCompositor (); 74 bool hadCompositorAnimation = animation->hasActiveAnimationsOnCompositor ();
75 if (animation->preCommit(compositorGroup, startOnCompositor)) { 75 // Animations with a start time do not participate in compositor start-t ime grouping.
76 if (animation->preCommit(animation->hasStartTime() ? 0 : compositorGroup , startOnCompositor)) {
ctserng 2015/09/14 14:30:32 Will we run the risk of hitting the assert here:
76 if (animation->hasActiveAnimationsOnCompositor() && !hadCompositorAn imation) { 77 if (animation->hasActiveAnimationsOnCompositor() && !hadCompositorAn imation) {
77 startedSynchronizedOnCompositor = true; 78 startedSynchronizedOnCompositor = true;
78 } 79 }
79 80
80 if (animation->playing() && !animation->hasStartTime()) { 81 if (animation->playing() && !animation->hasStartTime()) {
81 waitingForStartTime.append(animation.get()); 82 waitingForStartTime.append(animation.get());
82 } 83 }
83 } else { 84 } else {
84 deferred.append(animation); 85 deferred.append(animation);
85 } 86 }
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 154
154 } 155 }
155 156
156 DEFINE_TRACE(CompositorPendingAnimations) 157 DEFINE_TRACE(CompositorPendingAnimations)
157 { 158 {
158 visitor->trace(m_pending); 159 visitor->trace(m_pending);
159 visitor->trace(m_waitingForCompositorAnimationStart); 160 visitor->trace(m_waitingForCompositorAnimationStart);
160 } 161 }
161 162
162 } // namespace 163 } // namespace
OLDNEW
« 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