|
| 1 | +2020-10-14 Antoine Quint < [email protected]> |
| 2 | + |
| 3 | + Simplify management of LayerPropertyAnimation instances in GraphicsLayerCA |
| 4 | + https://bugs.webkit.org/show_bug.cgi?id=217707 |
| 5 | + <rdar://problem/70291140> |
| 6 | + |
| 7 | + Reviewed by Dean Jackson. |
| 8 | + |
| 9 | + The management of LayerPropertyAnimation instances in GraphicsLayerCA spread |
| 10 | + those animations between different data structures. We now simplify this to |
| 11 | + be a single Vector<LayerPropertyAnimation> with three new properties. |
| 12 | + |
| 13 | + The m_playState property indicates: |
| 14 | + |
| 15 | + - whether the animation has been added to the list but awaiting the next commit |
| 16 | + to be played (PlayPending) |
| 17 | + - whether the animation has been committed and playing (Playing) |
| 18 | + - whether the animation has been marked to be paused but awaiting the next commit |
| 19 | + to be paused (PausePending) |
| 20 | + - whether the animation has been committed and paused (Paused) |
| 21 | + |
| 22 | + The m_pendingRemoval property indicates whether the animation has been marked for |
| 23 | + removal upon the next commit. |
| 24 | + |
| 25 | + The m_beginTime property indicates the time at which the animation was first added, |
| 26 | + ensuring that the animation can be removed and re-added while preserving the same |
| 27 | + begin time. |
| 28 | + |
| 29 | + As such, when GraphicsLayerCA::updateAnimations() is called we remove all animations |
| 30 | + from the layer, filter m_animations to only have animations that are not marked |
| 31 | + as pending removal, and add the now-current list of animations to the layer. |
| 32 | + |
| 33 | + No new test since this change is refactoring only and should not have any change |
| 34 | + in behavior. |
| 35 | + |
| 36 | + * platform/graphics/ca/GraphicsLayerCA.cpp: |
| 37 | + (WebCore::GraphicsLayerCA::moveOrCopyAnimations): |
| 38 | + (WebCore::GraphicsLayerCA::animationIsRunning const): |
| 39 | + (WebCore::animationCanBeAccelerated): |
| 40 | + (WebCore::GraphicsLayerCA::pauseAnimation): |
| 41 | + (WebCore::GraphicsLayerCA::removeAnimation): |
| 42 | + (WebCore::GraphicsLayerCA::platformCALayerAnimationStarted): |
| 43 | + (WebCore::GraphicsLayerCA::updateAnimations): |
| 44 | + (WebCore::GraphicsLayerCA::isRunningTransformAnimation const): |
| 45 | + (WebCore::GraphicsLayerCA::setAnimationOnLayer): |
| 46 | + (WebCore::GraphicsLayerCA::removeCAAnimationFromLayer): |
| 47 | + (WebCore::GraphicsLayerCA::pauseCAAnimationOnLayer): |
| 48 | + (WebCore::GraphicsLayerCA::createAnimationFromKeyframes): |
| 49 | + (WebCore::GraphicsLayerCA::appendToUncommittedAnimations): |
| 50 | + (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes): |
| 51 | + (WebCore::animationIdentifier): Deleted. |
| 52 | + (WebCore::GraphicsLayerCA::animationCanBeAccelerated const): Deleted. |
| 53 | + (WebCore::GraphicsLayerCA::addProcessingActionForAnimation): Deleted. |
| 54 | + (WebCore::GraphicsLayerCA::ensureLayerAnimations): Deleted. |
| 55 | + * platform/graphics/ca/GraphicsLayerCA.h: |
| 56 | + (WebCore::GraphicsLayerCA::hasAnimations const): |
| 57 | + (WebCore::GraphicsLayerCA::LayerPropertyAnimation::animationIdentifier const): |
| 58 | + (WebCore::GraphicsLayerCA::moveAnimations): |
| 59 | + (WebCore::GraphicsLayerCA::copyAnimations): |
| 60 | + (WebCore::GraphicsLayerCA::animationIsRunning const): Deleted. |
| 61 | + (WebCore::GraphicsLayerCA::AnimationProcessingAction::AnimationProcessingAction): Deleted. |
| 62 | + |
1 | 63 | 2020-10-14 Youenn Fablet < [email protected]>
|
2 | 64 |
|
3 | 65 | MediaRecorder .stop should not throw in Inactive state
|
|
0 commit comments