[webkit-changes] [WebKit/WebKit] ffac46: [UI-side compositing] A no-op rendering update sti...

Simon Fraser noreply at github.com
Sat Mar 18 16:56:35 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ffac46f94d522ad4b04c3cb74a1d2dd1f80d79e6
      https://github.com/WebKit/WebKit/commit/ffac46f94d522ad4b04c3cb74a1d2dd1f80d79e6
  Author: Simon Fraser <simon.fraser at apple.com>
  Date:   2023-03-18 (Sat, 18 Mar 2023)

  Changed paths:
    M LayoutTests/TestExpectations
    M LayoutTests/platform/ios/TestExpectations
    M LayoutTests/platform/mac-wk2/TestExpectations
    A LayoutTests/remote-layer-tree/no-layer-changes-from-raf-expected.txt
    A LayoutTests/remote-layer-tree/no-layer-changes-from-raf.html
    M Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.h
    M Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.mm
    M Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStoreCollection.h
    M Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStoreCollection.mm
    M Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreeTransaction.h
    M Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm
    M Source/WebKit/Shared/RemoteLayerTree/RemoteLayerWithRemoteRenderingBackingStoreCollection.h
    M Source/WebKit/Shared/RemoteLayerTree/RemoteLayerWithRemoteRenderingBackingStoreCollection.mm
    M Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivateForTesting.h
    M Source/WebKit/UIProcess/API/Cocoa/WKWebViewTesting.mm
    M Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.h
    M Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm
    M Tools/TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl
    M Tools/TestRunnerShared/UIScriptContext/UIScriptController.h
    M Tools/WebKitTestRunner/cocoa/UIScriptControllerCocoa.h
    M Tools/WebKitTestRunner/cocoa/UIScriptControllerCocoa.mm

  Log Message:
  -----------
  [UI-side compositing] A no-op rendering update still triggers a WindowServer update
https://bugs.webkit.org/show_bug.cgi?id=254118
rdar://106790532

Reviewed by Tim Horton.

One of the criteria used by RemoteLayerWithRemoteRenderingBackingStoreCollection::backingStoreNeedsDisplay()
to determine whether a RemoteLayerBackingStore needs display was that it had no backend sharing handle
(which represents the Mach port used to share the IOSurface with the UI process). However, this is always
true for a layer with backing store, since we take this handle and send it to the UI process. So not
having a backend handle in the web process is the normal state.

So remove this condition, which makes the logic identical for all RemoteLayerBackingStores (i.e. DOM
rendering in the GPU Process or not), so we can move the logic into RemoteLayerBackingStore::needsDisplay().

To test, add UIScriptController.countOfUpdatesWithLayerChanges, which is hooked up via WKWebView's "testing"
SPI and measured in RemoteLayerTreeDrawingAreaProxy::commitLayerTree().

* LayoutTests/remote-layer-tree/no-layer-changes-from-raf-expected.txt: Added.
* LayoutTests/remote-layer-tree/no-layer-changes-from-raf.html: Added.
* Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.h:
(WebKit::RemoteLayerBackingStoreProperties::bufferHandle const):
(WebKit::RemoteLayerBackingStoreProperties::frontBufferIdentifier const):
(WebKit::RemoteLayerBackingStoreProperties::backBufferIdentifier const):
(WebKit::RemoteLayerBackingStoreProperties::secondaryBackBufferIdentifier const):
(WebKit::RemoteLayerBackingStoreProperties::isOpaque const):
* Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::needsDisplay const):
(WebKit::RemoteLayerBackingStore::prepareToDisplay):
(WebKit::operator<<):
* Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStoreCollection.h:
* Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStoreCollection.mm:
(WebKit::RemoteLayerBackingStoreCollection::backingStoreNeedsDisplay const): Deleted.
* Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreeTransaction.h:
(WebKit::RemoteLayerTreeTransaction::hasAnyLayerChanges const):
* Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm:
(WebKit::dumpChangedLayers):
(WebKit::nameForBackingStoreType): Deleted.
(WebKit::operator<<): Deleted.
* Source/WebKit/Shared/RemoteLayerTree/RemoteLayerWithRemoteRenderingBackingStoreCollection.h:
* Source/WebKit/Shared/RemoteLayerTree/RemoteLayerWithRemoteRenderingBackingStoreCollection.mm:
(WebKit::RemoteLayerWithRemoteRenderingBackingStoreCollection::backingStoreNeedsDisplay const): Deleted.
* Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivateForTesting.h:
* Source/WebKit/UIProcess/API/Cocoa/WKWebViewTesting.mm:
(-[WKWebView _countOfUpdatesWithLayerChanges]):
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.h:
(WebKit::RemoteLayerTreeDrawingAreaProxy::countOfTransactionsWithNonEmptyLayerChanges const):
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
* Tools/TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
* Tools/TestRunnerShared/UIScriptContext/UIScriptController.h:
(WTR::UIScriptController::countOfUpdatesWithLayerChanges const):
* Tools/WebKitTestRunner/cocoa/UIScriptControllerCocoa.h:
* Tools/WebKitTestRunner/cocoa/UIScriptControllerCocoa.mm:
(WTR::UIScriptControllerCocoa::countOfUpdatesWithLayerChanges const):

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




More information about the webkit-changes mailing list