Skip to content

Commit 09e9770

Browse files
committed
Accelerated animations of individual transform properties should apply rotate before scale
https://bugs.webkit.org/show_bug.cgi?id=218659 Reviewed by Simon Fraser. Not that applying scale before rotate makes any difference, but applying the operations in the order specified in the CSS Transforms spec will make the code easier to understand between this and RenderStyle::applyTransform(). No test since there is no change of behavior. * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::updateAnimations): Canonical link: https://commits.webkit.org/231322@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269527 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent d24ecea commit 09e9770

2 files changed

Lines changed: 26 additions & 10 deletions

File tree

Source/WebCore/ChangeLog

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
2020-11-06 Antoine Quint <graouts@webkit.org>
2+
3+
Accelerated animations of individual transform properties should apply rotate before scale
4+
https://bugs.webkit.org/show_bug.cgi?id=218659
5+
6+
Reviewed by Simon Fraser.
7+
8+
Not that applying scale before rotate makes any difference, but applying the operations in
9+
the order specified in the CSS Transforms spec will make the code easier to understand between
10+
this and RenderStyle::applyTransform().
11+
12+
No test since there is no change of behavior.
13+
14+
* platform/graphics/ca/GraphicsLayerCA.cpp:
15+
(WebCore::GraphicsLayerCA::updateAnimations):
16+
117
2020-11-06 Wenson Hsieh <wenson_hsieh@apple.com>
218

319
[Concurrent display lists] Encode display list items directly into shared memory

Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3001,16 +3001,16 @@ void GraphicsLayerCA::updateAnimations()
30013001
else
30023002
addBaseValueTransformAnimation(AnimatedPropertyTranslate);
30033003

3004-
if (scaleAnimation)
3005-
addAnimation(*scaleAnimation);
3006-
else
3007-
addBaseValueTransformAnimation(AnimatedPropertyScale);
3008-
30093004
if (rotateAnimation)
30103005
addAnimation(*rotateAnimation);
30113006
else
30123007
addBaseValueTransformAnimation(AnimatedPropertyRotate);
30133008

3009+
if (scaleAnimation)
3010+
addAnimation(*scaleAnimation);
3011+
else
3012+
addBaseValueTransformAnimation(AnimatedPropertyScale);
3013+
30143014
for (auto* animation : transformAnimations)
30153015
addAnimation(*animation);
30163016
if (transformAnimations.isEmpty())
@@ -3021,16 +3021,16 @@ void GraphicsLayerCA::updateAnimations()
30213021
if (transformAnimations.isEmpty())
30223022
addBaseValueTransformAnimation(AnimatedPropertyTransform);
30233023

3024-
if (rotateAnimation)
3025-
addAnimation(*rotateAnimation);
3026-
else
3027-
addBaseValueTransformAnimation(AnimatedPropertyRotate);
3028-
30293024
if (scaleAnimation)
30303025
addAnimation(*scaleAnimation);
30313026
else
30323027
addBaseValueTransformAnimation(AnimatedPropertyScale);
30333028

3029+
if (rotateAnimation)
3030+
addAnimation(*rotateAnimation);
3031+
else
3032+
addBaseValueTransformAnimation(AnimatedPropertyRotate);
3033+
30343034
if (translateAnimation)
30353035
addAnimation(*translateAnimation);
30363036
else

0 commit comments

Comments
 (0)