[webkit-changes] [WebKit/WebKit] bb99bf: Optimize transform operations under GraphicsLayerC...
Simon Fraser
noreply at github.com
Thu Jun 22 21:55:31 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: bb99bf09fcfa78c93479bb58f3dd6bcbf4e0b469
https://github.com/WebKit/WebKit/commit/bb99bf09fcfa78c93479bb58f3dd6bcbf4e0b469
Author: Simon Fraser <simon.fraser at apple.com>
Date: 2023-06-22 (Thu, 22 Jun 2023)
Changed paths:
M Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
M Source/WebCore/platform/graphics/transforms/TransformState.h
M Source/WebCore/platform/graphics/transforms/TransformationMatrix.cpp
M Source/WebCore/platform/graphics/transforms/TransformationMatrix.h
Log Message:
-----------
Optimize transform operations under GraphicsLayerCA::flushCompositingState()
https://bugs.webkit.org/show_bug.cgi?id=258388
rdar://111141766
Reviewed by Cameron McCormack.
Optimize GraphicsLayerCA::layerTransform() by avoiding default construction of two
TransformationMatrices on the stack, and avoiding work involving currentTransform
if it's known to be identity (i.e. both customTransform and m_transform are null).
Similarly we can avoid construction followed by assignment of a matrix in
GraphicsLayerCA::VisibleAndCoverageRects() via a lambda.
Add a way to construct a TransformationMatrix with a translation.
* Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::layerTransform const):
(WebCore::GraphicsLayerCA::computeVisibleAndCoverageRect const):
* Source/WebCore/platform/graphics/transforms/TransformState.h: Use an initializer.
(WebCore::TransformState::TransformState):
* Source/WebCore/platform/graphics/transforms/TransformationMatrix.cpp:
* Source/WebCore/platform/graphics/transforms/TransformationMatrix.h:
(WebCore::TransformationMatrix::TransformationMatrix):
Canonical link: https://commits.webkit.org/265444@main
More information about the webkit-changes
mailing list