[webkit-changes] [WebKit/WebKit] f816a1: Fix some assertions when using a canvas without a ...

Alex Christensen noreply at github.com
Tue Mar 12 16:14:31 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f816a1743b89245484a0ea3462c76fe88d593d3e
      https://github.com/WebKit/WebKit/commit/f816a1743b89245484a0ea3462c76fe88d593d3e
  Author: Alex Christensen <achristensen at apple.com>
  Date:   2024-03-12 (Tue, 12 Mar 2024)

  Changed paths:
    A LayoutTests/fast/webgpu/use-canvas-without-layer-expected.txt
    A LayoutTests/fast/webgpu/use-canvas-without-layer.html
    M Source/WebCore/Modules/WebGPU/GPU.cpp
    M Source/WebCore/Modules/WebGPU/GPU.h
    M Source/WebCore/Modules/WebGPU/GPUCommandEncoder.cpp
    M Source/WebCore/Modules/WebGPU/GPUCommandEncoder.h
    M Source/WebCore/Modules/WebGPU/GPUDevice.cpp
    M Source/WebCore/Modules/WebGPU/GPUDevice.h
    M Source/WebCore/Modules/WebGPU/GPUPresentationContext.cpp
    M Source/WebCore/Modules/WebGPU/GPUPresentationContext.h
    M Source/WebCore/Modules/WebGPU/GPURenderBundleEncoder.cpp
    M Source/WebCore/Modules/WebGPU/GPURenderBundleEncoder.h
    M Source/WebCore/Modules/WebGPU/GPUTexture.cpp
    M Source/WebCore/Modules/WebGPU/Implementation/WebGPUCommandEncoderImpl.cpp
    M Source/WebCore/Modules/WebGPU/Implementation/WebGPUCommandEncoderImpl.h
    M Source/WebCore/Modules/WebGPU/Implementation/WebGPUDeviceImpl.cpp
    M Source/WebCore/Modules/WebGPU/Implementation/WebGPUDeviceImpl.h
    M Source/WebCore/Modules/WebGPU/Implementation/WebGPUImpl.cpp
    M Source/WebCore/Modules/WebGPU/Implementation/WebGPUImpl.h
    M Source/WebCore/Modules/WebGPU/Implementation/WebGPUPresentationContextImpl.cpp
    M Source/WebCore/Modules/WebGPU/Implementation/WebGPUPresentationContextImpl.h
    M Source/WebCore/Modules/WebGPU/Implementation/WebGPURenderBundleEncoderImpl.cpp
    M Source/WebCore/Modules/WebGPU/Implementation/WebGPURenderBundleEncoderImpl.h
    M Source/WebCore/Modules/WebGPU/Implementation/WebGPUTextureImpl.cpp
    M Source/WebCore/Modules/WebGPU/Implementation/WebGPUTextureImpl.h
    M Source/WebCore/Modules/WebGPU/InternalAPI/WebGPU.h
    M Source/WebCore/Modules/WebGPU/InternalAPI/WebGPUCommandEncoder.h
    M Source/WebCore/Modules/WebGPU/InternalAPI/WebGPUDevice.h
    M Source/WebCore/Modules/WebGPU/InternalAPI/WebGPUPresentationContext.h
    M Source/WebCore/Modules/WebGPU/InternalAPI/WebGPURenderBundleEncoder.h
    M Source/WebCore/Modules/WebGPU/InternalAPI/WebGPUTexture.h
    M Source/WebCore/html/canvas/GPUCanvasContextCocoa.h
    M Source/WebCore/html/canvas/GPUCanvasContextCocoa.mm
    M Source/WebGPU/WebGPU/PresentationContextIOSurface.mm
    M Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.cpp
    M Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.h
    M Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.messages.in
    M Source/WebKit/GPUProcess/graphics/WebGPU/RemoteCommandEncoder.cpp
    M Source/WebKit/GPUProcess/graphics/WebGPU/RemoteDevice.cpp
    M Source/WebKit/GPUProcess/graphics/WebGPU/RemoteGPU.cpp
    M Source/WebKit/GPUProcess/graphics/WebGPU/RemotePresentationContext.cpp
    M Source/WebKit/GPUProcess/graphics/WebGPU/RemoteRenderBundleEncoder.cpp
    M Source/WebKit/GPUProcess/graphics/WebGPU/RemoteTexture.cpp
    M Source/WebKit/Scripts/webkit/messages.py
    M Source/WebKit/Shared/WebCoreArgumentCoders.cpp
    M Source/WebKit/Shared/WebCoreArgumentCoders.h
    M Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp
    M Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.h
    M Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteBufferProxy.cpp
    M Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteCommandEncoderProxy.cpp
    M Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteCommandEncoderProxy.h
    M Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteDeviceProxy.cpp
    M Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteDeviceProxy.h
    M Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteGPUProxy.cpp
    M Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteGPUProxy.h
    M Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemotePresentationContextProxy.cpp
    M Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemotePresentationContextProxy.h
    M Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteRenderBundleEncoderProxy.cpp
    M Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteRenderBundleEncoderProxy.h
    M Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteTextureProxy.cpp
    M Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteTextureProxy.h
    M Source/WebKit/WebProcess/GPU/media/ios/RemoteMediaSessionHelper.h

  Log Message:
  -----------
  Fix some assertions when using a canvas without a layer with webgpu
https://bugs.webkit.org/show_bug.cgi?id=270705
rdar://124213314

Reviewed by Mike Wyrzykowski.

The test in this PR hit several issues:
1. PresentationContextIOSurface::present asserted, which I changed to an early return.
2. I handle errors when creating objects by returning nullptr instead of an object that
   has no corresponding object in the GPU process, and propogate those errors to JS.
3. I added a WeakPtr check in the lambda in GPUCanvasContextCocoa::prepareForDisplay
4. In order to keep Windows building after this change, I needed to change
   FontPlatformData::Attributes to FontPlatformDataAttributes in WebKit.

* LayoutTests/fast/webgpu/use-canvas-without-layer-expected.txt: Added.
* LayoutTests/fast/webgpu/use-canvas-without-layer.html: Added.
* Source/WebGPU/WebGPU/PresentationContextIOSurface.mm:
* Source/WebKit/Platform/IPC/StreamServerConnection.cpp:
(IPC::StreamServerConnection::dispatchStreamMessages):
* Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteTextureProxy.cpp:
(WebKit::WebGPU::RemoteTextureProxy::~RemoteTextureProxy):
(WebKit::WebGPU::RemoteTextureProxy::createView):
(WebKit::WebGPU::RemoteTextureProxy::destroy):
(WebKit::WebGPU::RemoteTextureProxy::setLabelInternal):
* Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteTextureProxy.h:

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



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list