[webkit-changes] [WebKit/WebKit] 8e6829: [UI-side compositing] Avoid sync IPC with the GPU ...

Simon Fraser noreply at github.com
Sun Mar 19 08:51:24 PDT 2023


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

  Changed paths:
    M Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.h
    M Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.mm
    M Source/WebKit/Shared/RemoteLayerTree/RemoteLayerWithRemoteRenderingBackingStoreCollection.mm

  Log Message:
  -----------
  [UI-side compositing] Avoid sync IPC with the GPU Process when there are no buffers to swap
https://bugs.webkit.org/show_bug.cgi?id=254119
rdar://106900111

Reviewed by Cameron McCormack.

When a layer is painted for the first time, we enter RemoteLayerWithRemoteRenderingBackingStoreCollection::prepareBackingStoresForDisplay()
with a RemoteLayerBackingStore that has no buffers. Currently, we still send sync IPC to the GPU process to swap buffers, which does
nothing in this case.

So take backing stores with no existing buffers out of the list that's sent to the GPU process, and don't message the GPU
process at all if no backing stores need swapping. For these backing stores, call `applySwappedBuffers()` with null arguments,
which will allocate the front buffer.

* Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.h:
(WebKit::RemoteLayerBackingStore::hasNoBuffers const):
* Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:
(WebKit::operator<<):
* Source/WebKit/Shared/RemoteLayerTree/RemoteLayerWithRemoteRenderingBackingStoreCollection.mm:
(WebKit::RemoteLayerWithRemoteRenderingBackingStoreCollection::prepareBackingStoresForDisplay):

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




More information about the webkit-changes mailing list