Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: e54f40436b984bb35a58cb7aa6e06a5102d9e5c9
https://github.com/WebKit/WebKit/commit/e54f40436b984bb35a58cb7aa6e06a5102d9e5c9
Author: Chris Dumez <[email protected]>
Date: 2026-04-04 (Sat, 04 Apr 2026)
Changed paths:
M Source/WebCore/rendering/RenderLayer.cpp
Log Message:
-----------
Use std::optional instead of heap allocation for oldTransform in
updateTransform()
https://bugs.webkit.org/show_bug.cgi?id=311483
Reviewed by Alan Baradlay.
The previous transform value was copied into a heap-allocated
unique_ptr<TransformationMatrix> solely for comparison. Use
std::optional<TransformationMatrix> on the stack instead to avoid
a malloc/free pair. TransformationMatrix is 128 bytes (16 doubles),
which is fine for the stack. updateTransform() runs during style
changes and animations, so this avoids unnecessary allocator pressure
on a frequently called path.
* Source/WebCore/rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateTransform):
Canonical link: https://commits.webkit.org/310589@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications