[webkit-changes] [WebKit/WebKit] 545623: CG display lists stick around on layers even after...

Tim Horton noreply at github.com
Wed Feb 22 19:29:01 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 545623ba3da1f4867c26ed80feefec663f0e45c2
      https://github.com/WebKit/WebKit/commit/545623ba3da1f4867c26ed80feefec663f0e45c2
  Author: Tim Horton <timothy_horton at apple.com>
  Date:   2023-02-22 (Wed, 22 Feb 2023)

  Changed paths:
    M Source/WebCore/platform/graphics/cocoa/WebCoreCALayerExtras.h
    M Source/WebCore/platform/graphics/cocoa/WebCoreCALayerExtras.mm
    M Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.mm
    M Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm

  Log Message:
  -----------
  CG display lists stick around on layers even after backing store is removed
https://bugs.webkit.org/show_bug.cgi?id=252777
rdar://104935890

Reviewed by Dean Jackson.

When removing backing store from a layer (because e.g. it became `visibility: hidden`),
we need to also remove the CG display list blob.

* Source/WebCore/platform/graphics/cocoa/WebCoreCALayerExtras.h:
* Source/WebCore/platform/graphics/cocoa/WebCoreCALayerExtras.mm:
(-[CALayer _web_clearContents]):
Factor out "clear contents and display list if installed" code.

Work around a bug where it's currently not possible to reset the display list to nil
without causing the layer to create its own backing store, by assigning an empty display list instead.

* Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer):
If we don't have layer contents for some unexpected reason (e.g. IPC timeout),
clear both contents and display list.

* Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm:
(WebKit::RemoteLayerTreePropertyApplier::applyPropertiesToLayer):
If we don't have backing store at all, clear both contents and display list.

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




More information about the webkit-changes mailing list