Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: fd86b54293b5d6c3e9b9a07b5373afa488456f66
https://github.com/WebKit/WebKit/commit/fd86b54293b5d6c3e9b9a07b5373afa488456f66
Author: Ben Nham <[email protected]>
Date: 2026-09-01 (Tue, 01 Sep 2026)
Changed paths:
M Source/WebCore/platform/graphics/transforms/TransformationMatrix.cpp
M Source/WebCore/platform/graphics/transforms/TransformationMatrix.h
M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
M Tools/TestWebKitAPI/Tests/IPC/ArgumentCoderTests.cpp
M Tools/TestWebKitAPI/Tests/WebCore/TransformationMatrix.cpp
Log Message:
-----------
Reduce IPC encoded size of TransformationMatrix
https://bugs.webkit.org/show_bug.cgi?id=322906
rdar://186162772
Reviewed by Kiet Ho and Per Arne Vollan.
With Site Isolation, we now broadcast multiple TransformationMatrix instances
at frame rate to
remote frame processes, so it makes sense to add some code to reduce the size
of those matrices over
the wire.
This adds some specializations for common TransformationMatrix types that don't
require the full 4x4
matrix (specifically identity, 2D transforms, 3D transforms, and affine
transforms). The added
ArgumentCoder tests ensure that these matrices use fewer bytes over the wire as
intended.
Tests: Tools/TestWebKitAPI/Tests/IPC/ArgumentCoderTests.cpp
Tools/TestWebKitAPI/Tests/WebCore/TransformationMatrix.cpp
* Source/WebCore/platform/graphics/transforms/TransformationMatrix.cpp:
(WebCore::TransformationMatrix::ipcData const):
(WebCore::TransformationMatrix::fromIPCData):
* Source/WebCore/platform/graphics/transforms/TransformationMatrix.h:
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:
* Tools/TestWebKitAPI/Tests/IPC/ArgumentCoderTests.cpp:
(TestWebKitAPI::testTransformationMatrixCoding):
(TestWebKitAPI::TEST(ArgumentCoderTransformationMatrix,
IdentityCostsOnlyTheVariantTag)):
(TestWebKitAPI::TEST(ArgumentCoderTransformationMatrix,
Translation2DCostsTwoDoubles)):
(TestWebKitAPI::TEST(ArgumentCoderTransformationMatrix,
Translation3DCostsThreeDoubles)):
(TestWebKitAPI::TEST(ArgumentCoderTransformationMatrix, AffineCostsSixDoubles)):
(TestWebKitAPI::TEST(ArgumentCoderTransformationMatrix,
NonAffineCostsSixteenDoubles)):
* Tools/TestWebKitAPI/Tests/WebCore/TransformationMatrix.cpp:
(TestWebKitAPI::testIPCDataRoundTrip):
(TestWebKitAPI::TEST(TransformationMatrix, IPCDataIdentity)):
(TestWebKitAPI::TEST(TransformationMatrix, IPCDataTranslation2D)):
(TestWebKitAPI::TEST(TransformationMatrix, IPCDataTranslation3D)):
(TestWebKitAPI::TEST(TransformationMatrix, IPCDataAffine)):
(TestWebKitAPI::TEST(TransformationMatrix, IPCDataFull)):
Canonical link: https://commits.webkit.org/320258@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications