[webkit-changes] [WebKit/WebKit] cdbcc9: [CoordinatedGraphics] Use CoordinatedPlatformLayer...
Carlos Garcia Campos
noreply at github.com
Fri Dec 20 04:15:17 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: cdbcc94d4406d5c42901ffb9fbc67c795ca8b3ce
https://github.com/WebKit/WebKit/commit/cdbcc94d4406d5c42901ffb9fbc67c795ca8b3ce
Author: Carlos Garcia Campos <cgarcia at igalia.com>
Date: 2024-12-20 (Fri, 20 Dec 2024)
Changed paths:
M .github/CODEOWNERS
M Source/WebCore/page/scrolling/coordinated/ScrollingTreeCoordinated.h
R Source/WebCore/platform/SourcesNicosia.txt
M Source/WebCore/platform/TextureMapper.cmake
R Source/WebCore/platform/graphics/nicosia/NicosiaCompositionLayer.h
R Source/WebCore/platform/graphics/nicosia/NicosiaPlatformLayer.h
R Source/WebCore/platform/graphics/nicosia/NicosiaScene.cpp
R Source/WebCore/platform/graphics/nicosia/NicosiaScene.h
M Source/WebCore/platform/graphics/texmap/TextureMapperGCGLPlatformLayer.h
M Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp
M Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxy.h
M Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedBackingStore.cpp
M Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedPlatformLayer.cpp
M Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedPlatformLayer.h
M Source/WebKit/PlatformPlayStation.cmake
M Source/WebKit/SourcesGTK.txt
M Source/WebKit/SourcesWPE.txt
M Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp
M Source/WebKit/WebProcess/GPU/media/gstreamer/VideoLayerRemoteGStreamer.cpp
M Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsScene.cpp
M Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsScene.h
A Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/CoordinatedSceneState.cpp
A Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/CoordinatedSceneState.h
M Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp
M Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.h
M Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/ThreadedCompositor.cpp
M Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/ThreadedCompositor.h
M Source/cmake/OptionsGTK.cmake
M Source/cmake/OptionsPlayStation.cmake
M Source/cmake/OptionsWPE.cmake
M Tools/Scripts/webkit-filter-log
M Tools/Scripts/webkitpy/port/gtk.py
M Tools/Scripts/webkitpy/port/wpe.py
Log Message:
-----------
[CoordinatedGraphics] Use CoordinatedPlatformLayer in the composition
https://bugs.webkit.org/show_bug.cgi?id=284742
Reviewed by Alejandro G. Castro.
Update the composition code to use CoordinatedPlatformLayer:
- CoordinatedPlatformLayer now has a target which is the TextureMapperLayer
object that will be used by the TextureMapper during the composition.
- CoordinatedPlatformLayer::flushCompositingState() checks all pending
changes and writes the changed properties on the target TextureMapperLayer
and updates the layer contents. CoordinatedGraphicsScene::updateSceneState()
now only needs to a iterate the layers calling flushCompositingState().
- A new class CoordinatedSceneState has been added to keep the scene
state, but instead of passing the state on every composition
request, the CoordinatedSceneState object is created by the
LayerTreeHost on construction and passed to the
CoordinatedGraphicsScene constructor too. It works similar to a
GraphicsLayer, whenever the scene changes because layers are added
or removed, a pending state is kept. Then when compositing the
pending state is committed when layers are asked causing any removed
layer to be destroyed too.
- In LayerTreeHost the root layer no longer needs to be a GraphicsLayer,
and now it's a CoordinatedPlatformLayer that is used as the root
layer in the composition too.
* .github/CODEOWNERS:
* Source/WebCore/page/scrolling/coordinated/ScrollingTreeCoordinated.h:
* Source/WebCore/platform/SourcesNicosia.txt: Removed.
* Source/WebCore/platform/TextureMapper.cmake:
* Source/WebCore/platform/graphics/nicosia/NicosiaCompositionLayer.h: Removed.
* Source/WebCore/platform/graphics/nicosia/NicosiaPlatformLayer.h: Removed.
* Source/WebCore/platform/graphics/nicosia/NicosiaScene.cpp: Removed.
* Source/WebCore/platform/graphics/nicosia/NicosiaScene.h: Removed.
* Source/WebCore/platform/graphics/texmap/TextureMapperGCGLPlatformLayer.h:
* Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp:
(WebCore::TextureMapperPlatformLayerProxy::~TextureMapperPlatformLayerProxy):
(WebCore::TextureMapperPlatformLayerProxy::isActiveLocked const):
(WebCore::TextureMapperPlatformLayerProxy::activateOnCompositingThread):
(WebCore::TextureMapperPlatformLayerProxy::invalidate):
(WebCore::TextureMapperPlatformLayerProxy::swapBuffer):
(WebCore::TextureMapperPlatformLayerProxy::pushNextBuffer):
(WebCore::TextureMapperPlatformLayerProxy::dropCurrentBufferWhilePreservingTexture):
* Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxy.h:
* Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedBackingStore.cpp:
(WebCore::CoordinatedBackingStore::paintToTextureMapper):
* Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedPlatformLayer.cpp:
(WebCore::CoordinatedPlatformLayer::CoordinatedPlatformLayer):
(WebCore::CoordinatedPlatformLayer::ensureTarget):
(WebCore::CoordinatedPlatformLayer::target const):
(WebCore::CoordinatedPlatformLayer::invalidateTarget):
(WebCore::CoordinatedPlatformLayer::setPosition):
(WebCore::CoordinatedPlatformLayer::setPositionForScrolling):
(WebCore::CoordinatedPlatformLayer::setBoundsOrigin):
(WebCore::CoordinatedPlatformLayer::setBoundsOriginForScrolling):
(WebCore::CoordinatedPlatformLayer::setAnchorPoint):
(WebCore::CoordinatedPlatformLayer::setSize):
(WebCore::CoordinatedPlatformLayer::setTransform):
(WebCore::CoordinatedPlatformLayer::setChildrenTransform):
(WebCore::CoordinatedPlatformLayer::setScrollingNodeID):
(WebCore::CoordinatedPlatformLayer::setDrawsContent):
(WebCore::CoordinatedPlatformLayer::setMasksToBounds):
(WebCore::CoordinatedPlatformLayer::setPreserves3D):
(WebCore::CoordinatedPlatformLayer::setBackfaceVisibility):
(WebCore::CoordinatedPlatformLayer::setOpacity):
(WebCore::CoordinatedPlatformLayer::setContentsVisible):
(WebCore::CoordinatedPlatformLayer::setContentsOpaque):
(WebCore::CoordinatedPlatformLayer::setContentsRect):
(WebCore::CoordinatedPlatformLayer::setContentsRectClipsDescendants):
(WebCore::CoordinatedPlatformLayer::setContentsClippingRect):
(WebCore::CoordinatedPlatformLayer::setContentsScale):
(WebCore::CoordinatedPlatformLayer::setContentsBuffer):
(WebCore::CoordinatedPlatformLayer::setContentsImage):
(WebCore::CoordinatedPlatformLayer::setContentsColor):
(WebCore::CoordinatedPlatformLayer::setContentsTileSize):
(WebCore::CoordinatedPlatformLayer::setContentsTilePhase):
(WebCore::CoordinatedPlatformLayer::setDirtyRegion):
(WebCore::CoordinatedPlatformLayer::setDamage):
(WebCore::CoordinatedPlatformLayer::setFilters):
(WebCore::CoordinatedPlatformLayer::setMask):
(WebCore::CoordinatedPlatformLayer::setReplica):
(WebCore::CoordinatedPlatformLayer::setBackdrop):
(WebCore::CoordinatedPlatformLayer::setBackdropRect):
(WebCore::CoordinatedPlatformLayer::setAnimations):
(WebCore::CoordinatedPlatformLayer::setChildren):
(WebCore::CoordinatedPlatformLayer::setEventRegion):
(WebCore::CoordinatedPlatformLayer::setDebugBorder):
(WebCore::CoordinatedPlatformLayer::setShowRepaintCounter):
(WebCore::CoordinatedPlatformLayer::needsBackingStore const):
(WebCore::CoordinatedPlatformLayer::updateBackingStore):
(WebCore::CoordinatedPlatformLayer::updateContents):
(WebCore::CoordinatedPlatformLayer::purgeBackingStores):
(WebCore::CoordinatedPlatformLayer::flushCompositingState):
* Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedPlatformLayer.h:
(WebCore::CoordinatedPlatformLayer::id const):
(WebCore::CoordinatedPlatformLayer::compositionLayer const): Deleted.
* Source/WebKit/SourcesGTK.txt:
* Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:
* Source/WebKit/WebProcess/GPU/media/gstreamer/VideoLayerRemoteGStreamer.cpp:
* Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
(WebKit::CoordinatedGraphicsScene::CoordinatedGraphicsScene):
(WebKit::CoordinatedGraphicsScene::paintToCurrentGLContext):
(WebKit::CoordinatedGraphicsScene::updateSceneState):
(WebKit::CoordinatedGraphicsScene::purgeGLResources):
(WebKit::CoordinatedGraphicsScene::applyStateChanges): Deleted.
(WebKit::CoordinatedGraphicsScene::onNewBufferAvailable): Deleted.
(WebKit::texmapLayer): Deleted.
(WebKit::updateBackingStore): Deleted.
(WebKit::CoordinatedGraphicsScene::removeLayer): Deleted.
(WebKit::CoordinatedGraphicsScene::commitSceneState): Deleted.
(WebKit::CoordinatedGraphicsScene::ensureRootLayer): Deleted.
* Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsScene.h:
(WebKit::CoordinatedGraphicsScene::state const):
(WebKit::CoordinatedGraphicsScene::rootLayer): Deleted.
* Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/CoordinatedSceneState.cpp: Added.
(WebKit::CoordinatedSceneState::CoordinatedSceneState):
(WebKit::CoordinatedSceneState::~CoordinatedSceneState):
(WebKit::CoordinatedSceneState::setRootLayerChildren):
(WebKit::CoordinatedSceneState::addLayer):
(WebKit::CoordinatedSceneState::removeLayer):
(WebKit::CoordinatedSceneState::flush):
(WebKit::CoordinatedSceneState::committedLayers):
(WebKit::CoordinatedSceneState::invalidateCommittedLayers):
(WebKit::CoordinatedSceneState::invalidate):
* Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/CoordinatedSceneState.h: Added.
* Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp:
(WebKit::LayerTreeHost::LayerTreeHost):
(WebKit::LayerTreeHost::~LayerTreeHost):
(WebKit::LayerTreeHost::flushLayers):
(WebKit::LayerTreeHost::updateRootLayer):
(WebKit::LayerTreeHost::setRootCompositingLayer):
(WebKit::LayerTreeHost::setViewOverlayRootLayer):
(WebKit::LayerTreeHost::sizeDidChange):
(WebKit::LayerTreeHost::attachLayer):
(WebKit::LayerTreeHost::detachLayer):
(WebKit::LayerTreeHost::commitSceneState):
* Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.h:
* Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/ThreadedCompositor.cpp:
(WebKit::ThreadedCompositor::invalidate):
(WebKit::ThreadedCompositor::renderLayerTree):
(WebKit::ThreadedCompositor::requestComposition):
(WebKit::ThreadedCompositor::updateSceneWithoutRendering): Deleted.
* Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/ThreadedCompositor.h:
* Source/cmake/OptionsGTK.cmake:
* Source/cmake/OptionsPlayStation.cmake:
* Source/cmake/OptionsWPE.cmake:
* Tools/Scripts/webkit-filter-log:
* Tools/Scripts/webkitpy/port/gtk.py:
(GtkPort.setup_environ_for_server):
* Tools/Scripts/webkitpy/port/wpe.py:
(WPEPort.setup_environ_for_server):
Canonical link: https://commits.webkit.org/288158@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list