[webkit-changes] [WebKit/WebKit] 12198a: RemoteLayerBackingStoreCollection doesn't support ...

mattwoodrow noreply at github.com
Mon Dec 4 20:20:18 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 12198a179de6bbb9c9e7da80441dfe77a3d71c27
      https://github.com/WebKit/WebKit/commit/12198a179de6bbb9c9e7da80441dfe77a3d71c27
  Author: Matt Woodrow <mattwoodrow at apple.com>
  Date:   2023-12-04 (Mon, 04 Dec 2023)

  Changed paths:
    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
    A Source/WebKit/Shared/RemoteLayerTree/RemoteLayerWithInProcessRenderingBackingStore.h
    A Source/WebKit/Shared/RemoteLayerTree/RemoteLayerWithInProcessRenderingBackingStore.mm
    A Source/WebKit/Shared/RemoteLayerTree/RemoteLayerWithRemoteRenderingBackingStore.h
    A Source/WebKit/Shared/RemoteLayerTree/RemoteLayerWithRemoteRenderingBackingStore.mm
    R Source/WebKit/Shared/RemoteLayerTree/RemoteLayerWithRemoteRenderingBackingStoreCollection.h
    R Source/WebKit/Shared/RemoteLayerTree/RemoteLayerWithRemoteRenderingBackingStoreCollection.mm
    M Source/WebKit/SourcesCocoa.txt
    M Source/WebKit/WebKit.xcodeproj/project.pbxproj
    M Source/WebKit/WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.mm
    M Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeContext.mm

  Log Message:
  -----------
  RemoteLayerBackingStoreCollection doesn't support mixing remote rendering with in process rendering.
https://bugs.webkit.org/show_bug.cgi?id=265617
<rdar://119010082>

Reviewed by Tim Horton.

We currently have a polymorphic RemoteLayerBackingStoreCollection object, which
 requires an upfront decision about whether in-process or remote rendering will
be used.

We should instead have a single RemoteLayerBackingStoreCollection which supports
mixing in-process and remote RemoteLayerBackingStore objects as needed.

This merges RemoteLayerBackingStoreCollection with the 'WithRemoteRendering' variant,
and the resulting code checks the type of each backing stores and handles them
separately (for functions that require it).

RemoteLayerBackingStore is split to have two subclasses ('Remote' and 'InProcess'),
and code that only applies to that situation is moved out of the base class.

We still currently only create a single type of backing store based on the global
flag, but mixing types should now be supported.

* Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.h:
(WebKit::RemoteLayerBackingStore::isRemoteLayerWithRemoteRenderingBackingStore const):
(WebKit::RemoteLayerBackingStore::isRemoteLayerWithInProcessRenderingBackingStore const):
* Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::ensureFrontBuffer):
(WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer): Deleted.
(WebKit::RemoteLayerBackingStore::applySwappedBuffers): Deleted.
(WebKit::RemoteLayerBackingStore::prepareToDisplay): Deleted.
(WebKit::RemoteLayerBackingStore::prepareBuffers): Deleted.
(WebKit::RemoteLayerBackingStore::setBufferVolatile): Deleted.
(WebKit::RemoteLayerBackingStore::setBufferNonVolatile): Deleted.
(WebKit::RemoteLayerBackingStore::setFrontBufferNonVolatile): Deleted.
* Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStoreCollection.h:
(WebKit::RemoteLayerBackingStoreCollection::layerTreeContext const):
(WebKit::RemoteLayerBackingStoreCollection::markInProcessBackingStoreVolatile):
(WebKit::RemoteLayerBackingStoreCollection::gpuProcessConnectionWasDestroyed): Deleted.
(WebKit::RemoteLayerBackingStoreCollection::markBackingStoreVolatile): Deleted.
* Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStoreCollection.mm:
(WebKit::RemoteLayerBackingStoreCollection::RemoteLayerBackingStoreCollection):
(WebKit::RemoteLayerBackingStoreCollection::prepareBackingStoresForDisplay):
(WebKit::RemoteLayerBackingStoreCollection::createRemoteLayerBackingStore):
(WebKit::RemoteLayerBackingStoreCollection::markInProcessBackingStoreVolatile):
(WebKit::RemoteLayerBackingStoreCollection::markBackingStoreVolatileAfterReachabilityChange):
(WebKit::RemoteLayerBackingStoreCollection::markAllBackingStoreVolatile):
(WebKit::RemoteLayerBackingStoreCollection::tryMarkAllBackingStoreVolatile):
(WebKit::RemoteLayerBackingStoreCollection::markAllBackingStoreVolatileFromTimer):
(WebKit::RemoteLayerBackingStoreCollection::gpuProcessConnectionWasDestroyed):
(WebKit::RemoteLayerBackingStoreCollection::collectRemoteRenderingBackingStoreBufferIdentifiersToMarkVolatile):
(WebKit::RemoteLayerBackingStoreCollection::collectAllRemoteRenderingBufferIdentifiersToMarkVolatile):
(WebKit::RemoteLayerBackingStoreCollection::sendMarkBuffersVolatile):
(WebKit::RemoteLayerBackingStoreCollection::markBackingStoreVolatile): Deleted.
(WebKit::RemoteLayerBackingStoreCollection::allocateBufferForBackingStore): Deleted.
* Source/WebKit/Shared/RemoteLayerTree/RemoteLayerWithInProcessRenderingBackingStore.h: Added.
(isType):
* Source/WebKit/Shared/RemoteLayerTree/RemoteLayerWithInProcessRenderingBackingStore.mm: Added.
(WebKit::RemoteLayerWithInProcessRenderingBackingStore::prepareBuffers):
(WebKit::RemoteLayerWithInProcessRenderingBackingStore::setBufferVolatile):
(WebKit::RemoteLayerWithInProcessRenderingBackingStore::setBufferNonVolatile):
(WebKit::RemoteLayerWithInProcessRenderingBackingStore::setFrontBufferNonVolatile):
(WebKit::RemoteLayerWithInProcessRenderingBackingStore::allocateBuffer const):
(WebKit::RemoteLayerWithInProcessRenderingBackingStore::prepareToDisplay):
(WebKit::RemoteLayerWithInProcessRenderingBackingStore::swapToValidFrontBuffer):
* Source/WebKit/Shared/RemoteLayerTree/RemoteLayerWithRemoteRenderingBackingStore.h: Added.
(isType):
* Source/WebKit/Shared/RemoteLayerTree/RemoteLayerWithRemoteRenderingBackingStore.mm: Added.
(WebKit::RemoteLayerWithRemoteRenderingBackingStore::applySwappedBuffers):
(WebKit::RemoteLayerWithRemoteRenderingBackingStore::allocateBuffer const):
* Source/WebKit/Shared/RemoteLayerTree/RemoteLayerWithRemoteRenderingBackingStoreCollection.h: Removed.
* Source/WebKit/Shared/RemoteLayerTree/RemoteLayerWithRemoteRenderingBackingStoreCollection.mm: Removed.
* Source/WebKit/SourcesCocoa.txt:
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:
* Source/WebKit/WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.mm:
(WebKit::PlatformCALayerRemote::ensureBackingStore):
* Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeContext.mm:
(WebKit::RemoteLayerTreeContext::RemoteLayerTreeContext):

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




More information about the webkit-changes mailing list