Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b825954ee089fbe3cbc58dabc71e132e14d45c12
https://github.com/WebKit/WebKit/commit/b825954ee089fbe3cbc58dabc71e132e14d45c12
Author: Nikolas Zimmermann <[email protected]>
Date: 2026-07-14 (Tue, 14 Jul 2026)
Changed paths:
M
Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedPlatformLayer.cpp
M
Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedPlatformLayer.h
Log Message:
-----------
[Coordinated] Damage a layer when its state changes the composited result
https://bugs.webkit.org/show_bug.cgi?id=319375
Reviewed by Carlos Garcia Campos.
A layer records damage when its backing store re-renders and when a new contents
buffer arrives, and the compositor layers damage the whole layer themselves when
it is resized or its opacity or transform changes. Nothing records damage for
the
rest of the state the compositor applies while drawing the layer: the contents
rect, the contents tiling, filters, masks, the clip path, the blend mode and
contents visibility. Changing any of those changes the pixels the compositor
produces for the layer, but none of them dirties a tile, so the backing store is
never re-rendered and no damage is recorded on their behalf.
A compositor that draws just the damaged rects therefore leaves the previous
frame's pixels on screen. e.g. An animated background-position on a directly
composited image only changes the contents tile phase, so the frame currently
carries no damage at all and the animation freezes.
Therefore damage the whole layer from those setters.
*
Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedPlatformLayer.cpp:
(WebCore::CoordinatedPlatformLayer::setMasksToBounds):
(WebCore::CoordinatedPlatformLayer::setBlendMode):
(WebCore::CoordinatedPlatformLayer::setContentsVisible):
(WebCore::CoordinatedPlatformLayer::setContentsOpaque):
(WebCore::CoordinatedPlatformLayer::setContentsRect):
(WebCore::CoordinatedPlatformLayer::setContentsRectClipsDescendants):
(WebCore::CoordinatedPlatformLayer::setContentsClippingRect):
(WebCore::CoordinatedPlatformLayer::setContentsBuffer):
(WebCore::CoordinatedPlatformLayer::setContentsImage):
(WebCore::CoordinatedPlatformLayer::setContentsTileSize):
(WebCore::CoordinatedPlatformLayer::setContentsTilePhase):
(WebCore::CoordinatedPlatformLayer::damageWholeLayer):
(WebCore::CoordinatedPlatformLayer::setFilters):
(WebCore::CoordinatedPlatformLayer::setMask):
(WebCore::CoordinatedPlatformLayer::setReplica):
(WebCore::CoordinatedPlatformLayer::notifyBackdropFiltersChanged):
(WebCore::CoordinatedPlatformLayer::setBackdropRect):
(WebCore::CoordinatedPlatformLayer::setClipPath):
*
Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedPlatformLayer.h:
Canonical link: https://commits.webkit.org/317142@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications