haikuwebkit/Source/WebCore/display/compositing
Geoffrey Garen 10fc66526a GraphicsLayer::setName() causes heap fragmentation
https://bugs.webkit.org/show_bug.cgi?id=225838

Reviewed by Simon Fraser.

Profiling for heap fragmentation shows that GraphicsLayer::setName() is
a top contributor. Worth about 5MB maximum on GMail.

Use MAKE_STATIC_STRING_IMPL for our constant layer names so we end up
with only one copy and no heap allocation in the many cases that are
compile-time constants.

Source/WebCore:

* display/compositing/DisplayLayerController.cpp:
(WebCore::Display::LayerController::setupRootLayerHierarchy):
* page/PageOverlayController.cpp:
(WebCore::PageOverlayController::createRootLayersIfNeeded):
(WebCore::PageOverlayController::installPageOverlay):
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::setContentsToSolidColor):
(WebCore::GraphicsLayerCA::setContentsToModel):
(WebCore::GraphicsLayerCA::updateBackdropFilters):
(WebCore::GraphicsLayerCA::updateContentsImage):
(WebCore::GraphicsLayerCA::updateClippingStrategy):
(WebCore::GraphicsLayerCA::updateContentsRects):
* platform/graphics/ca/TileCoverageMap.cpp:
(WebCore::TileCoverageMap::TileCoverageMap):
* platform/graphics/ca/win/CACFLayerTreeHost.cpp:
(WebCore::CACFLayerTreeHost::initialize):
(WebCore::CACFLayerTreeHost::updateDebugInfoLayer):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateLayerForTopOverhangArea):
(WebCore::RenderLayerCompositor::updateLayerForBottomOverhangArea):
(WebCore::RenderLayerCompositor::updateLayerForHeader):
(WebCore::RenderLayerCompositor::updateLayerForFooter):
(WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
(WebCore::RenderLayerCompositor::ensureRootLayer):

Source/WebKit:

* WebProcess/Inspector/WebInspectorClient.cpp:
(WebKit::WebInspectorClient::showPaintRect):
* WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
(WebKit::CompositingCoordinator::CompositingCoordinator):
* WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp:
(WebKit::LayerTreeHost::LayerTreeHost):
* WebProcess/WebPage/CoordinatedGraphics/LayerTreeHostTextureMapper.cpp:
(WebKit::LayerTreeHost::LayerTreeHost):
* WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):


Canonical link: https://commits.webkit.org/237953@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@277792 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-05-20 17:08:30 +00:00
..
DisplayLayerController.cpp GraphicsLayer::setName() causes heap fragmentation 2021-05-20 17:08:30 +00:00
DisplayLayerController.h [LFC Display] Hook up very basic repaint in the display tree 2021-01-04 18:13:53 +00:00