Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 8445610f3e92053c4f6c778e8faf3fdac3998f68
https://github.com/WebKit/WebKit/commit/8445610f3e92053c4f6c778e8faf3fdac3998f68
Author: Ahmad Saleem <[email protected]>
Date: 2026-09-01 (Tue, 01 Sep 2026)
Changed paths:
M Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
Log Message:
-----------
GraphicsLayerCA::updateDebugIndicators() forces a full-layer repaint on
ordinary property changes
https://bugs.webkit.org/show_bug.cgi?id=322773
Reviewed by Dan Glastonbury.
updateDebugIndicators() called m_layer->setNeedsDisplay() unconditionally. That
runs whenever DebugIndicatorsChanged is committed, and DebugIndicatorsChanged is
OR-ed into ordinary, non-debug property setters (setMasksToBounds,
setDrawsContent, setDrawsHDRContent, setBackdropFilters). As a result, toggling
e.g. overflow:hidden on a content-drawing, backing-store-attached layer forced a
full backing-store re-rasterization (plus a buffer swap, and IPC re-transmission
of the buffer on the Remote layer tree backend) even when no debug indicator was
enabled -- pure waste, since masksToBounds/backdrop/clipping are compositor
properties CA applies without repainting any pixels.
The only reason for the repaint is to refresh the repaint counter, which is
drawn
into the layer's own backing store during content paint (PlatformCALayer::
drawLayerContents -> drawRepaintIndicator, gated on isShowingRepaintCounter()).
Debug borders and frame-process borders are CA properties / separate indicator
layers and never repaint pixels.
Gate the setNeedsDisplay() in updateDebugIndicators() on
isShowingRepaintCounter().
The rest of updateDebugIndicators() (updateFrameProcessIndicators() and the
setLayerDebugBorder() recolor, which depends on masksToBounds/drawsContent)
still
runs unconditionally. To handle disabling the counter -- at which point
isShowingRepaintCounter() is already false, so updateDebugIndicators() would not
clear the last-drawn counter -- setShowRepaintCounter() now forces one repaint
on
both transitions.
* Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::updateDebugIndicators):
(WebCore::GraphicsLayerCA::setShowRepaintCounter):
Canonical link: https://commits.webkit.org/320296@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications