[webkit-changes] [WebKit/WebKit] c59ecb: NativeImages shared to GPUP do not store GPUP-spec...

Kimmo Kinnunen noreply at github.com
Tue Jan 30 05:27:00 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c59ecbabbca2f4c226d684a5b68432191294bf24
      https://github.com/WebKit/WebKit/commit/c59ecbabbca2f4c226d684a5b68432191294bf24
  Author: Kimmo Kinnunen <kkinnunen at apple.com>
  Date:   2024-01-30 (Tue, 30 Jan 2024)

  Changed paths:
    M Source/WebCore/platform/graphics/NativeImage.cpp
    M Source/WebCore/platform/graphics/NativeImage.h
    M Source/WebKit/Sources.txt
    M Source/WebKit/WebKit.xcodeproj/project.pbxproj
    A Source/WebKit/WebProcess/GPU/graphics/RemoteNativeImageBackendProxy.cpp
    A Source/WebKit/WebProcess/GPU/graphics/RemoteNativeImageBackendProxy.h
    M Source/WebKit/WebProcess/GPU/graphics/RemoteResourceCacheProxy.cpp

  Log Message:
  -----------
  NativeImages shared to GPUP do not store GPUP-specific information
https://bugs.webkit.org/show_bug.cgi?id=267998
rdar://121517135

Reviewed by Matt Woodrow.

Modify current NativeImage behavior to use new
RemoteNativeImageBackendProxy.

RemoteNativeImageBackendProxy will be used to store GPUP specific
information. This is needed for cases where other engines, like
WebGL, WebGPU or such create NativeImages at GPUP side
and share them without waits to WP.

Store the shared memory to this class, so that when GPUP crashes, the
shared memory will not be recreated. This storage will be used in the
future to sink WP-only shareable ImageBuffer into shareable
NativeImages.

* Source/WebCore/platform/graphics/NativeImage.cpp:
(WebCore::NativeImageBackend::isRemoteNativeImageBackendProxy const):
(WebCore::NativeImage::replaceBackend):
(WebCore::NativeImage::replaceContents): Deleted.
* Source/WebCore/platform/graphics/NativeImage.h:
* Source/WebKit/Sources.txt:
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:
* Source/WebKit/WebProcess/GPU/graphics/RemoteNativeImageBackendProxy.cpp: Added.
(WebKit::RemoteNativeImageBackendProxy::create):
(WebKit::RemoteNativeImageBackendProxy::RemoteNativeImageBackendProxy):
(WebKit::RemoteNativeImageBackendProxy::platformImage const):
(WebKit::RemoteNativeImageBackendProxy::size const):
(WebKit::RemoteNativeImageBackendProxy::hasAlpha const):
(WebKit::RemoteNativeImageBackendProxy::colorSpace const):
(WebKit::RemoteNativeImageBackendProxy::isRemoteNativeImageBackendProxy const):
(WebKit::RemoteNativeImageBackendProxy::createHandle):
* Source/WebKit/WebProcess/GPU/graphics/RemoteNativeImageBackendProxy.h: Added.
(isType):
* Source/WebKit/WebProcess/GPU/graphics/RemoteResourceCacheProxy.cpp:
(WebKit::RemoteResourceCacheProxy::recordNativeImageUse):
(WebKit::createShareableBitmapFromNativeImage): Deleted.

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




More information about the webkit-changes mailing list