[webkit-changes] [WebKit/WebKit] c94a19: Generate serialization of RemoteLayerTreeTransaction

Alex Christensen noreply at github.com
Tue Jul 18 17:36:13 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c94a19745dcb20e781a8fa3ca3fe72aca98c5113
      https://github.com/WebKit/WebKit/commit/c94a19745dcb20e781a8fa3ca3fe72aca98c5113
  Author: Alex Christensen <achristensen at apple.com>
  Date:   2023-07-18 (Tue, 18 Jul 2023)

  Changed paths:
    M Source/WTF/wtf/Forward.h
    M Source/WebKit/CMakeLists.txt
    M Source/WebKit/Platform/IPC/ArgumentCoders.h
    M Source/WebKit/Scripts/generate-serializers.py
    M Source/WebKit/Scripts/webkit/tests/GeneratedSerializers.cpp
    M Source/WebKit/Scripts/webkit/tests/GeneratedSerializers.h
    M Source/WebKit/Scripts/webkit/tests/SerializedTypeInfo.cpp
    M Source/WebKit/Scripts/webkit/tests/TestSerializedType.serialization.in
    A Source/WebKit/Shared/RemoteLayerTree/LayerProperties.h
    M Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTree.serialization.in
    M Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.h
    M Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm
    M Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreeTransaction.h
    M Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm
    M Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm
    M Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm
    M Source/WebKit/WebKit.xcodeproj/project.pbxproj
    M Source/WebKit/WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.h

  Log Message:
  -----------
  Generate serialization of RemoteLayerTreeTransaction
https://bugs.webkit.org/show_bug.cgi?id=259316
rdar://112491333

Reviewed by Simon Fraser.

This removes a lot of boilerplate code and replaces it with generated code with static_asserts
that verify we didn't forget anything.  It also exposes the structure to the IPC testing API.
The collections of changed layers were a little tricky, but by adding the new attribute CustomEncoder
we can manually write the encoder and it keeps all the complexity in one small class.

* Source/WTF/wtf/Forward.h:
* Source/WebKit/Platform/IPC/ArgumentCoders.h:
(IPC::ArgumentCoder<UniqueRef<T>>::encode):
(IPC::ArgumentCoder<UniqueRef<T>>::decode):
* Source/WebKit/Scripts/generate-serializers.py:
(SerializedType.__init__):
(generate_impl):
* Source/WebKit/Scripts/webkit/tests/GeneratedSerializers.cpp:
(IPC::ArgumentCoder<WebKit::CustomEncoded>::decode):
* Source/WebKit/Scripts/webkit/tests/GeneratedSerializers.h:
* Source/WebKit/Scripts/webkit/tests/SerializedTypeInfo.cpp:
(WebKit::allSerializedTypes):
* Source/WebKit/Scripts/webkit/tests/TestSerializedType.serialization.in:
* Source/WebKit/Shared/RemoteLayerTree/LayerProperties.h: Added.
(WebKit::LayerProperties::notePropertiesChanged):
(WebKit::LayerProperties::resetChangedProperties):
* Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTree.serialization.in:
* Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.h:
* Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm:
(WebKit::applyCommonPropertiesToLayer):
(WebKit::RemoteLayerTreePropertyApplier::applyPropertiesToLayer):
(WebKit::RemoteLayerTreePropertyApplier::applyProperties):
(WebKit::applyInteractionRegionsHierarchyUpdate):
(WebKit::RemoteLayerTreePropertyApplier::applyHierarchyUpdates):
(WebKit::RemoteLayerTreePropertyApplier::updateMask):
(WebKit::RemoteLayerTreePropertyApplier::applyPropertiesToUIView):
* Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreeTransaction.h:
(WebKit::RemoteLayerTreeTransaction::LayerProperties::notePropertiesChanged): Deleted.
(WebKit::RemoteLayerTreeTransaction::LayerProperties::resetChangedProperties): Deleted.
(WebKit::RemoteLayerTreeTransaction::hasAnyLayerChanges const): Deleted.
(WebKit::RemoteLayerTreeTransaction::changedLayers): Deleted.
(WebKit::RemoteLayerTreeTransaction::changedLayerProperties const): Deleted.
(WebKit::RemoteLayerTreeTransaction::changedLayerProperties): Deleted.
* Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm:
(WebKit::LayerProperties::encode const):
(WebKit::LayerProperties::decode):
(WebKit::RemoteLayerTreeTransaction::layerPropertiesChanged):
(WebKit::dumpChangedLayers):
(WebKit::RemoteLayerTreeTransaction::description const):
(WebKit::RemoteLayerTreeTransaction::hasAnyLayerChanges const):
(WebKit::RemoteLayerTreeTransaction::changedLayers):
(WebKit::RemoteLayerTreeTransaction::changedLayerProperties const):
(WebKit::RemoteLayerTreeTransaction::changedLayerProperties):
(WebKit::ChangedLayers::ChangedLayers):
(IPC::ArgumentCoder<WebKit::ChangedLayers>::encode):
(WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties): Deleted.
(WebKit::RemoteLayerTreeTransaction::LayerProperties::encode const): Deleted.
(WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): Deleted.
(WebKit::RemoteLayerTreeTransaction::encode const): Deleted.
(WebKit::RemoteLayerTreeTransaction::decode): Deleted.
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm:
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm:
(WebKit::RemoteLayerTreeHost::updateLayerTree):
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:
* Source/WebKit/WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.h:
(WebKit::PlatformCALayerRemote::properties):
(WebKit::PlatformCALayerRemote::properties const):

Canonical link: https://commits.webkit.org/266149@main




More information about the webkit-changes mailing list