[webkit-changes] [WebKit/WebKit] b674f6: Implement layer hosting for WebKit extension proce...

Per Arne Vollan noreply at github.com
Fri Jan 5 13:12:12 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b674f6c410e6fd20169eb8f8da10f143feff1073
      https://github.com/WebKit/WebKit/commit/b674f6c410e6fd20169eb8f8da10f143feff1073
  Author: Per Arne Vollan <pvollan at apple.com>
  Date:   2024-01-05 (Fri, 05 Jan 2024)

  Changed paths:
    M Source/WebKit/GPUProcess/media/cocoa/RemoteMediaPlayerProxyCocoa.mm
    M Source/WebKit/Platform/ExtraPrivateSymbolsForTAPI.h
    M Source/WebKit/Platform/cocoa/LayerHostingContext.h
    M Source/WebKit/Platform/cocoa/LayerHostingContext.mm
    M Source/WebKit/Platform/spi/Cocoa/ExtensionKitSPI.h
    M Source/WebKit/Shared/Cocoa/ExtensionKitSoftLink.h
    M Source/WebKit/Shared/Cocoa/ExtensionKitSoftLink.mm
    M Source/WebKit/Shared/Cocoa/WKProcessExtension.mm
    M Source/WebKit/UIProcess/Cocoa/VideoPresentationManagerProxy.mm

  Log Message:
  -----------
  Implement layer hosting for WebKit extension processes
rdar://119381400
https://bugs.webkit.org/show_bug.cgi?id=266078

Reviewed by Andy Estes and Brent Fulgham.

Implement layer hosting for WebKit extension processes. In this implementation, the remote context is
represented by an object of type _SEHostable. In this implementation, the _SEHostable object is created
in the GPU process. The remote context is shared by extracting the context ID from the XPC representation
of the _SEHostable object, and sent to the UI process via the WebContent process as in the former
implementation. In the UI process, a _SEHostingHandle is created from the received context ID and
attached to the new view type we create in the UI process, _SEHostingView. Fencing is implemented with
the new object type _SEHostingUpdateCoordinator. This object is created in the UI process, and shared
with the GPU process from its XPC representation, which contains a Mach send right.

* Source/WebKit/GPUProcess/media/cocoa/RemoteMediaPlayerProxyCocoa.mm:
(WebKit::RemoteMediaPlayerProxy::mediaPlayerRenderingModeChanged):
(WebKit::RemoteMediaPlayerProxy::setVideoLayerSizeFenced):
* Source/WebKit/Platform/ExtraPrivateSymbolsForTAPI.h:
* Source/WebKit/Platform/cocoa/LayerHostingContext.h:
* Source/WebKit/Platform/cocoa/LayerHostingContext.mm:
(WebKit::LayerHostingContext::createForExternalHostingProcess):
(WebKit::LayerHostingContext::~LayerHostingContext):
(WebKit::LayerHostingContext::setRootLayer):
(WebKit::LayerHostingContext::rootLayer const):
(WebKit::LayerHostingContext::contextID const):
(WebKit::LayerHostingContext::setFencePort):
(WebKit::LayerHostingContext::xpcRepresentation const):
(WebKit::LayerHostingContext::commit):
* Source/WebKit/Platform/spi/Cocoa/ExtensionKitSPI.h:
* Source/WebKit/Shared/Cocoa/ExtensionKitSoftLink.h:
* Source/WebKit/Shared/Cocoa/ExtensionKitSoftLink.mm:
* Source/WebKit/Shared/Cocoa/WKProcessExtension.mm:
* Source/WebKit/UIProcess/Cocoa/VideoPresentationManagerProxy.mm:
(-[WKLayerHostView dealloc]):
(WebKit::VideoPresentationManagerProxy::createLayerHostViewWithID):
(WebKit::VideoPresentationManagerProxy::setVideoLayerFrame):

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




More information about the webkit-changes mailing list