OLD | NEW |
---|---|
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 Loading... | |
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 Loading... | |
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 |
OLD | NEW |