[webkit-changes] [WebKit/WebKit] 5b9c48: [WebGPU] Delete some unnecessary methods from WebG...

Myles C. Maxfield noreply at github.com
Tue Jun 6 00:37:01 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 5b9c48e708e7ffa2da29b615e9e78e92d2fc0370
      https://github.com/WebKit/WebKit/commit/5b9c48e708e7ffa2da29b615e9e78e92d2fc0370
  Author: Myles C. Maxfield <mmaxfield at apple.com>
  Date:   2023-06-06 (Tue, 06 Jun 2023)

  Changed paths:
    M Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUAdapterImpl.cpp
    M Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUBufferImpl.cpp
    M Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUDeviceImpl.cpp
    M Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUImpl.cpp
    M Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUQueueImpl.cpp
    M Source/WebGPU/WebGPU.xcodeproj/project.pbxproj
    M Source/WebGPU/WebGPU/WebGPUExt.h
    A Source/WebGPU/WebGPU/WebGPUInternal.h
    M Source/WebGPU/WebGPU/config.h

  Log Message:
  -----------
  [WebGPU] Delete some unnecessary methods from WebGPUExt.h
https://bugs.webkit.org/show_bug.cgi?id=257673
rdar://110201177

Reviewed by Mike Wyrzykowski.

The more custom stuff in WebGPUExt.h we have, the more difficult it will be to
swap in and out different WebGPU implementations. We generally want to minimize
the contents of WebGPUExt.h as much as possible.

This patch deletes the fooWithBlock() functions from being exported, in favor of
just using the common function pointer + userdata paradigm instead. This patch
doesn't actually delete the implementation of the fooWithBlock() functions,
because they will probably be useful while implementing
https://github.com/WebKit/WebKit/pull/13849. This patch therefore moves their
declaration to a WebGPUInternal.h file, which is not exported.

* Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUAdapterImpl.cpp:
(PAL::WebGPU::requestDeviceCallback):
(PAL::WebGPU::AdapterImpl::requestDevice):
* Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUBufferImpl.cpp:
(PAL::WebGPU::mapAsyncCallback):
(PAL::WebGPU::BufferImpl::mapAsync):
* Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUDeviceImpl.cpp:
(PAL::WebGPU::createComputePipelineAsyncCallback):
(PAL::WebGPU::DeviceImpl::createComputePipelineAsync):
(PAL::WebGPU::createRenderPipelineAsyncCallback):
(PAL::WebGPU::DeviceImpl::createRenderPipelineAsync):
(PAL::WebGPU::popErrorScopeCallback):
(PAL::WebGPU::DeviceImpl::popErrorScope):
* Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUImpl.cpp:
(PAL::WebGPU::requestAdapterCallback):
(PAL::WebGPU::GPUImpl::requestAdapter):
* Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUQueueImpl.cpp:
(PAL::WebGPU::onSubmittedWorkDoneCallback):
(PAL::WebGPU::QueueImpl::onSubmittedWorkDone):
* Source/WebGPU/WebGPU/Adapter.mm:
(wgpuAdapterRequestDevice):
(wgpuAdapterRequestDeviceWithBlock): Deleted.
* Source/WebGPU/WebGPU/Buffer.mm:
(wgpuBufferMapAsyncWithBlock): Deleted.
* Source/WebGPU/WebGPU/Device.mm:
(wgpuDeviceCreateComputePipelineAsyncWithBlock): Deleted.
(wgpuDeviceCreateRenderPipelineAsyncWithBlock): Deleted.
(wgpuDevicePopErrorScopeWithBlock): Deleted.
(wgpuDeviceSetUncapturedErrorCallbackWithBlock): Deleted.
* Source/WebGPU/WebGPU/Instance.mm:
(wgpuInstanceRequestAdapter):
(wgpuInstanceRequestAdapterWithBlock): Deleted.
* Source/WebGPU/WebGPU/Queue.mm:
(wgpuQueueOnSubmittedWorkDoneWithBlock): Deleted.
* Source/WebGPU/WebGPU/ShaderModule.mm:
(wgpuShaderModuleGetCompilationInfoWithBlock): Deleted.
* Source/WebGPU/WebGPU/WebGPUExt.h:

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




More information about the webkit-changes mailing list