Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 7581588fd861762e6abe201ba15ecf8fe930fa09
https://github.com/WebKit/WebKit/commit/7581588fd861762e6abe201ba15ecf8fe930fa09
Author: Richard Robinson <[email protected]>
Date: 2026-06-25 (Thu, 25 Jun 2026)
Changed paths:
M Source/WebGPU/Configurations/WebGPU.xcconfig
M Source/WebGPU/WebGPU/Buffer.h
M Source/WebGPU/WebGPU/Buffer.mm
M Source/WebGPU/WebGPU/Buffer.swift
M Source/WebGPU/WebGPU/CommandEncoder.mm
M Source/WebGPU/WebGPU/CommandEncoder.swift
M Source/WebGPU/WebGPU/Queue.mm
M Source/WebGPU/WebGPU/Queue.swift
Log Message:
-----------
[Swift in WebKit] Adopt `emit-clang-header-min-access` flag in WebGPU
https://bugs.webkit.org/show_bug.cgi?id=314869
rdar://177130998
Reviewed by Adrian Taylor and Mike Wyrzykowski.
Adopt the `-clang-header-expose-decls=has-expose-attr-or-stdlib` and
`-emit-clang-header-min-access internal` Swift flag options in WebGPU. The
latter makes it so that
`internal` symbols are exposed to C++ instead of just `public` symbols, and the
former limits it so
that only symbols annotated with `@_expose(Cxx)` are exposed. This improves
encapsulation and makes
WebGPU more aligned with WebKit, and removes the need to have any `public`
symbols in WebGPU.
This is also a pre-requisite for being able to adopt internal bridging headers
to replace internal modules.
Also clean up all the "thunk" names to be more normally named and simpler.
* Source/WebGPU/Configurations/WebGPU.xcconfig:
* Source/WebGPU/WebGPU/Buffer.h:
* Source/WebGPU/WebGPU/Buffer.mm:
(WebGPU::Buffer::getMappedRange):
(wgpuBufferCopy):
* Source/WebGPU/WebGPU/Buffer.swift:
(bufferCopyFrom(_:from:offset:)):
(bufferGetMappedRange(_:offset:size:)):
(Buffer_copyFrom_thunk(_:from:offset:)): Deleted.
(Buffer_getMappedRange_thunk(_:offset:size:)): Deleted.
* Source/WebGPU/WebGPU/CommandEncoder.mm:
(WebGPU::CommandEncoder::beginComputePass):
(WebGPU::CommandEncoder::runClearEncoder):
(WebGPU::CommandEncoder::beginRenderPass):
(WebGPU::CommandEncoder::copyBufferToBuffer):
(WebGPU::CommandEncoder::copyBufferToTexture):
(WebGPU::CommandEncoder::clearTextureIfNeeded):
(WebGPU::CommandEncoder::copyTextureToBuffer):
(WebGPU::CommandEncoder::copyTextureToTexture):
(WebGPU::CommandEncoder::clearBuffer):
(WebGPU::CommandEncoder::finish):
(WebGPU::CommandEncoder::resolveQuerySet):
* Source/WebGPU/WebGPU/CommandEncoder.swift:
(commandEncoderClearTextureIfNeeded(_:destination:slice:)):
(CommandEncoder_clearTextureIfNeeded_thunk(_:destination:slice:)): Deleted.
* Source/WebGPU/WebGPU/Queue.mm:
(WebGPU::Queue::writeBuffer):
* Source/WebGPU/WebGPU/Queue.swift:
(queueWriteBuffer(_:buffer:bufferOffset:data:)):
(Queue_writeBuffer_thunk(_:buffer:bufferOffset:data:)): Deleted.
Canonical link: https://commits.webkit.org/315833@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications