Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 8d8fa5a3d62041865fecf0d2558692a72f143126
      
https://github.com/WebKit/WebKit/commit/8d8fa5a3d62041865fecf0d2558692a72f143126
  Author: Kimmo Kinnunen <[email protected]>
  Date:   2024-04-10 (Wed, 10 Apr 2024)

  Changed paths:
    M Source/WebCore/Modules/webxr/WebXROpaqueFramebuffer.cpp
    M Source/WebCore/Modules/webxr/WebXROpaqueFramebuffer.h
    M Source/WebCore/platform/graphics/GraphicsContextGL.h
    M Source/WebCore/platform/graphics/GraphicsTypesGL.h
    M Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.cpp
    M Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.h
    M Source/WebCore/platform/graphics/cocoa/GraphicsContextGLCocoa.h
    M Source/WebCore/platform/graphics/cocoa/GraphicsContextGLCocoa.mm
    M Source/WebCore/platform/graphics/gbm/GraphicsContextGLGBM.cpp
    M Source/WebCore/platform/graphics/gbm/GraphicsContextGLGBM.h
    M 
Source/WebCore/platform/graphics/texmap/GraphicsContextGLTextureMapperANGLE.cpp
    M 
Source/WebCore/platform/graphics/texmap/GraphicsContextGLTextureMapperANGLE.h
    M Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.cpp
    M Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.h
    M Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.messages.in
    M Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGLCocoa.cpp
    M 
Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGLFunctionsGenerated.h
    M Source/WebKit/Scripts/webkit/messages.py
    M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
    M Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp
    M Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h
    M 
Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxyFunctionsGenerated.cpp
    M 
Source/WebKit/WebProcess/GPU/graphics/cocoa/RemoteGraphicsContextGLProxyCocoa.mm
    M Tools/Scripts/generate-gpup-webgl

  Log Message:
  -----------
  GraphicsContextGL external image and sync lifecycle handling is incorrect
https://bugs.webkit.org/show_bug.cgi?id=271642
rdar://125350987

Reviewed by Dan Glastonbury.

External images and sync objects had following problems:
 - created with synchronous calls
 - leaked when context was abandoned

Rename the concepts from EGLImage and EGLSync to ExternalImage and
ExternalSync, to highlight that these are not cross context objects,
rather objects bound to a specific GraphicsContextGL.

Rename the destroy function to delete to make the objects look similar
to normal GL objects.

Allocate client (WP) side names and send them to server (GPUP) side
during creation. This makes the creation asynchronous.

Destroy the underlying EGL objects when the real ANGLE context is
destroyed.

Generate the implementations, similar to other normal GraphicsContextGL
API calls.

Fix a bug in clientWaitExternalSyncWithFlush: it was asynchronous
instead of synchronous.

Due to the special handling of C++ function names beginning with
`create`, `createFoveation(...)` has been renamed to
`addFoveation(...)`.

* Source/WebCore/Modules/webxr/WebXROpaqueFramebuffer.cpp:
(WebCore::createAndBindCompositorTexture):
(WebCore::createAndBindCompositorBuffer):
(WebCore::makeEGLImageSource):
(WebCore::WebXROpaqueFramebuffer::startFrame):
(WebCore::WebXROpaqueFramebuffer::endFrame):
* Source/WebCore/Modules/webxr/WebXROpaqueFramebuffer.h:
* Source/WebCore/platform/graphics/GraphicsContextGL.h:
* Source/WebCore/platform/graphics/GraphicsTypesGL.h:
* Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.cpp:
(WebCore::GraphicsContextGLANGLE::createExternalImage):
(WebCore::GraphicsContextGLANGLE::bindEGLImage):
(WebCore::GraphicsContextGLANGLE::deleteExternalImage):
(WebCore::GraphicsContextGLANGLE::createExternalSync):
(WebCore::GraphicsContextGLANGLE::deleteExternalSync):
(WebCore::GraphicsContextGLANGLE::clientWaitExternalSyncWithFlush):
(WebCore::GraphicsContextGLANGLE::createAndBindEGLImage): Deleted.
(WebCore::GraphicsContextGLANGLE::destroyEGLImage): Deleted.
(WebCore::GraphicsContextGLANGLE::createEGLSync): Deleted.
(WebCore::GraphicsContextGLANGLE::destroyEGLSync): Deleted.
(WebCore::GraphicsContextGLANGLE::clientWaitEGLSyncWithFlush): Deleted.
* Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.h:
* Source/WebCore/platform/graphics/cocoa/GraphicsContextGLCocoa.h:
* Source/WebCore/platform/graphics/cocoa/GraphicsContextGLCocoa.mm:
(WebCore::GraphicsContextGLANGLE::~GraphicsContextGLANGLE):
(WebCore::GraphicsContextGLCocoa::createExternalImage):
(WebCore::GraphicsContextGLCocoa::bindEGLImage):
(WebCore::GraphicsContextGLCocoa::createExternalSync):
(WebCore::GraphicsContextGLCocoa::insertFinishedSignalOrInvoke):
(WebCore::GraphicsContextGLCocoa::createAndBindEGLImage): Deleted.
(WebCore::GraphicsContextGLCocoa::createEGLSync): Deleted.
* Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.cpp:
(WebKit::RemoteGraphicsContextGL::createAndBindEGLImage): Deleted.
* Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.h:
* Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.messages.in:
* Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGLCocoa.cpp:
(WebKit::RemoteGraphicsContextGLCocoa::createEGLSync): Deleted.
* Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGLFunctionsGenerated.h:
(createBuffer):
(createFramebuffer):
(createProgram):
(createRenderbuffer):
(createShader):
(createTexture):
(depthRange):
(createVertexArray):
(createQuery):
(createSampler):
(createTransformFeedback):
(createQueryEXT):
(createExternalImage):
(deleteExternalImage):
(bindEGLImage):
(createEGLSync):
(deleteExternalSync):
(clientWaitExternalSyncWithFlush):
(destroyEGLImage): Deleted.
(destroyEGLSync): Deleted.
(clientWaitEGLSyncWithFlush): Deleted.
* Source/WebKit/Scripts/webkit/messages.py:
(types_that_must_be_moved):
(types_that_cannot_be_forward_declared):
(headers_for_type):
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:
* Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp:
(WebKit::RemoteGraphicsContextGLProxy::createAndBindEGLImage): Deleted.
(WebKit::RemoteGraphicsContextGLProxy::createEGLSync): Deleted.
* Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h:
* 
Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxyFunctionsGenerated.cpp:
(WebKit::RemoteGraphicsContextGLProxy::createExternalImage):
(WebKit::RemoteGraphicsContextGLProxy::deleteExternalImage):
(WebKit::RemoteGraphicsContextGLProxy::bindEGLImage):
(WebKit::RemoteGraphicsContextGLProxy::createEGLSync):
(WebKit::RemoteGraphicsContextGLProxy::deleteExternalSync):
(WebKit::RemoteGraphicsContextGLProxy::clientWaitExternalSyncWithFlush):
(WebKit::RemoteGraphicsContextGLProxy::destroyEGLImage): Deleted.
(WebKit::RemoteGraphicsContextGLProxy::destroyEGLSync): Deleted.
(WebKit::RemoteGraphicsContextGLProxy::clientWaitEGLSyncWithFlush): Deleted.
* 
Source/WebKit/WebProcess/GPU/graphics/cocoa/RemoteGraphicsContextGLProxyCocoa.mm:
* Tools/Scripts/generate-gpup-webgl:
(cpp_type.is_reference):
(cpp_type):
(webkit_ipc_convert_expr):
(get_delete_func_object_name):
(webkit_ipc_msg.__init__):
(webkit_ipc_msg.__str__):
(context_proxy_cpp_webkit_ipc_generator.generate):
(webkit_ipc_cpp_impl.process_in_arg):
(webkit_ipc_cpp_impl.process_return_value):
(main):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to