WebGPU: Rename old WebGPU prototype to WebMetal
authorjustin_fan@apple.com <justin_fan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 9 Oct 2018 01:37:30 +0000 (01:37 +0000)
committerjustin_fan@apple.com <justin_fan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 9 Oct 2018 01:37:30 +0000 (01:37 +0000)
https://bugs.webkit.org/show_bug.cgi?id=190325
.:

Reviewed by Dean Jackson.

* Source/cmake/WebKitFeatures.cmake:

Source/JavaScriptCore:

<rdar://problem/44990443>

Reviewed by Dean Jackson.

Rename WebGPU prototype files to WebMetal in preparation for implementing the new (Oct 2018) WebGPU interface.

* Configurations/FeatureDefines.xcconfig:
* inspector/protocol/Canvas.json:
* inspector/scripts/codegen/generator.py:

Source/WebCore:

<rdar://problem/44990443>

Reviewed by Dean Jackson.

Existing WebGPU tests also renamed to reflect WebGPU -> WebMetal change.

Rename WebGPU prototype files to WebMetal in preparation for implementing the new (Oct 2018) WebGPU interface.

* CMakeLists.txt:
* Configurations/FeatureDefines.xcconfig:
* DerivedSources.make:
* Sources.txt:
* SourcesCocoa.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSWebMetalRenderPassAttachmentDescriptorCustom.cpp: Renamed from Source/WebCore/bindings/js/JSWebGPURenderPassAttachmentDescriptorCustom.cpp.
(WebCore::toJSNewlyCreated):
(WebCore::toJS):
* bindings/js/JSWebMetalRenderingContextCustom.cpp: Renamed from Source/WebCore/bindings/js/JSWebGPURenderingContextCustom.cpp.
(WebCore::JSWebMetalRenderingContext::visitAdditionalChildren):
* bindings/js/WebCoreBuiltinNames.h:
* dom/Document.cpp:
(WebCore::Document::getCSSCanvasContext):
* dom/Document.h:
* dom/Document.idl:
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::getContext):
(WebCore::HTMLCanvasElement::isWebMetalType):
(WebCore::HTMLCanvasElement::createContextWebMetal):
(WebCore::HTMLCanvasElement::getContextWebMetal):
(WebCore::HTMLCanvasElement::isWebGPUType): Deleted.
(WebCore::HTMLCanvasElement::createContextWebGPU): Deleted.
(WebCore::HTMLCanvasElement::getContextWebGPU): Deleted.
* html/HTMLCanvasElement.h:
* html/HTMLCanvasElement.idl:
* html/canvas/CanvasRenderingContext.h:
(WebCore::CanvasRenderingContext::isWebMetal const):
(WebCore::CanvasRenderingContext::isWebGPU const): Deleted.
* html/canvas/WebGPURenderingContext.cpp: Removed.
* html/canvas/WebMetalBuffer.cpp: Renamed from Source/WebCore/html/canvas/WebGPUBuffer.cpp.
(WebCore::WebMetalBuffer::create):
(WebCore::WebMetalBuffer::WebMetalBuffer):
* html/canvas/WebMetalBuffer.h: Renamed from Source/WebCore/html/canvas/WebGPUBuffer.h.
* html/canvas/WebMetalBuffer.idl: Renamed from Source/WebCore/html/canvas/WebGPUBuffer.idl.
* html/canvas/WebMetalCommandBuffer.cpp: Renamed from Source/WebCore/html/canvas/WebGPUCommandBuffer.cpp.
(WebCore::WebMetalCommandBuffer::create):
(WebCore::WebMetalCommandBuffer::WebMetalCommandBuffer):
(WebCore::WebMetalCommandBuffer::~WebMetalCommandBuffer):
(WebCore::WebMetalCommandBuffer::commit):
(WebCore::WebMetalCommandBuffer::presentDrawable):
(WebCore::WebMetalCommandBuffer::createRenderCommandEncoderWithDescriptor):
(WebCore::WebMetalCommandBuffer::createComputeCommandEncoder):
(WebCore::WebMetalCommandBuffer::completed):
* html/canvas/WebMetalCommandBuffer.h: Renamed from Source/WebCore/html/canvas/WebGPUCommandBuffer.h.
* html/canvas/WebMetalCommandBuffer.idl: Renamed from Source/WebCore/html/canvas/WebGPUCommandBuffer.idl.
* html/canvas/WebMetalCommandQueue.cpp: Renamed from Source/WebCore/html/canvas/WebGPUCommandQueue.cpp.
(WebCore::WebMetalCommandQueue::create):
(WebCore::WebMetalCommandQueue::WebMetalCommandQueue):
(WebCore::WebMetalCommandQueue::createCommandBuffer):
* html/canvas/WebMetalCommandQueue.h: Renamed from Source/WebCore/html/canvas/WebGPUCommandQueue.h.
* html/canvas/WebMetalCommandQueue.idl: Renamed from Source/WebCore/html/canvas/WebGPUCommandQueue.idl.
* html/canvas/WebMetalComputeCommandEncoder.cpp: Renamed from Source/WebCore/html/canvas/WebGPUComputeCommandEncoder.cpp.
(WebCore::GPUSizeMake):
(WebCore::WebMetalComputeCommandEncoder::create):
(WebCore::WebMetalComputeCommandEncoder::WebMetalComputeCommandEncoder):
(WebCore::WebMetalComputeCommandEncoder::setComputePipelineState):
(WebCore::WebMetalComputeCommandEncoder::setBuffer):
(WebCore::WebMetalComputeCommandEncoder::dispatch):
(WebCore::WebMetalComputeCommandEncoder::endEncoding):
* html/canvas/WebMetalComputeCommandEncoder.h: Renamed from Source/WebCore/html/canvas/WebGPUComputeCommandEncoder.h.
* html/canvas/WebMetalComputeCommandEncoder.idl: Renamed from Source/WebCore/html/canvas/WebGPUComputeCommandEncoder.idl.
* html/canvas/WebMetalComputePipelineState.cpp: Renamed from Source/WebCore/html/canvas/WebGPUComputePipelineState.cpp.
(WebCore::WebMetalComputePipelineState::create):
(WebCore::WebMetalComputePipelineState::WebMetalComputePipelineState):
* html/canvas/WebMetalComputePipelineState.h: Renamed from Source/WebCore/html/canvas/WebGPUComputePipelineState.h.
* html/canvas/WebMetalComputePipelineState.idl: Renamed from Source/WebCore/html/canvas/WebGPUComputePipelineState.idl.
* html/canvas/WebMetalDepthStencilDescriptor.cpp: Renamed from Source/WebCore/html/canvas/WebGPUDepthStencilDescriptor.cpp.
(WebCore::WebMetalDepthStencilDescriptor::create):
(WebCore::WebMetalDepthStencilDescriptor::depthWriteEnabled const):
(WebCore::WebMetalDepthStencilDescriptor::setDepthWriteEnabled):
(WebCore::WebMetalDepthStencilDescriptor::depthCompareFunction const):
(WebCore::WebMetalDepthStencilDescriptor::setDepthCompareFunction):
* html/canvas/WebMetalDepthStencilDescriptor.h: Renamed from Source/WebCore/html/canvas/WebGPUDepthStencilDescriptor.h.
* html/canvas/WebMetalDepthStencilDescriptor.idl: Renamed from Source/WebCore/html/canvas/WebGPUDepthStencilDescriptor.idl.
* html/canvas/WebMetalDepthStencilState.cpp: Renamed from Source/WebCore/html/canvas/WebGPUDepthStencilState.cpp.
(WebCore::WebMetalDepthStencilState::create):
(WebCore::WebMetalDepthStencilState::WebMetalDepthStencilState):
(WebCore::WebMetalDepthStencilState::label const):
(WebCore::WebMetalDepthStencilState::setLabel):
* html/canvas/WebMetalDepthStencilState.h: Renamed from Source/WebCore/html/canvas/WebGPUDepthStencilState.h.
* html/canvas/WebMetalDepthStencilState.idl: Renamed from Source/WebCore/html/canvas/WebGPURenderPipelineState.idl.
* html/canvas/WebMetalDrawable.cpp: Renamed from Source/WebCore/html/canvas/WebGPUDrawable.cpp.
(WebCore::WebMetalDrawable::create):
(WebCore::WebMetalDrawable::WebMetalDrawable):
* html/canvas/WebMetalDrawable.h: Renamed from Source/WebCore/html/canvas/WebGPUDrawable.h.
(WebCore::WebMetalDrawable::texture):
* html/canvas/WebMetalDrawable.idl: Renamed from Source/WebCore/html/canvas/WebGPUDrawable.idl.
* html/canvas/WebMetalEnums.cpp: Renamed from Source/WebCore/html/canvas/WebGPUEnums.cpp.
(WebCore::toWebMetalCompareFunction):
(WebCore::web3DCompareFunctionName):
(WebCore::toGPUCompareFunction):
* html/canvas/WebMetalEnums.h: Renamed from Source/WebCore/html/canvas/WebGPUEnums.h.
* html/canvas/WebMetalEnums.idl: Renamed from Source/WebCore/html/canvas/WebGPUEnums.idl.
* html/canvas/WebMetalFunction.cpp: Renamed from Source/WebCore/html/canvas/WebGPUFunction.cpp.
(WebCore::WebMetalFunction::create):
(WebCore::WebMetalFunction::WebMetalFunction):
* html/canvas/WebMetalFunction.h: Renamed from Source/WebCore/html/canvas/WebGPUFunction.h.
* html/canvas/WebMetalFunction.idl: Renamed from Source/WebCore/html/canvas/WebGPUFunction.idl.
* html/canvas/WebMetalLibrary.cpp: Renamed from Source/WebCore/html/canvas/WebGPULibrary.cpp.
(WebCore::WebMetalLibrary::create):
(WebCore::WebMetalLibrary::WebMetalLibrary):
(WebCore::WebMetalLibrary::functionNames const):
(WebCore::WebMetalLibrary::functionWithName const):
* html/canvas/WebMetalLibrary.h: Renamed from Source/WebCore/html/canvas/WebGPULibrary.h.
* html/canvas/WebMetalLibrary.idl: Renamed from Source/WebCore/html/canvas/WebGPULibrary.idl.
* html/canvas/WebMetalRenderCommandEncoder.cpp: Renamed from Source/WebCore/html/canvas/WebGPURenderCommandEncoder.cpp.
(WebCore::WebMetalRenderCommandEncoder::create):
(WebCore::WebMetalRenderCommandEncoder::WebMetalRenderCommandEncoder):
(WebCore::WebMetalRenderCommandEncoder::setRenderPipelineState):
(WebCore::WebMetalRenderCommandEncoder::setDepthStencilState):
(WebCore::WebMetalRenderCommandEncoder::setVertexBuffer):
(WebCore::WebMetalRenderCommandEncoder::setFragmentBuffer):
(WebCore::WebMetalRenderCommandEncoder::drawPrimitives):
(WebCore::WebMetalRenderCommandEncoder::endEncoding):
* html/canvas/WebMetalRenderCommandEncoder.h: Renamed from Source/WebCore/html/canvas/WebGPURenderCommandEncoder.h.
* html/canvas/WebMetalRenderCommandEncoder.idl: Renamed from Source/WebCore/html/canvas/WebGPURenderCommandEncoder.idl.
* html/canvas/WebMetalRenderPassAttachmentDescriptor.cpp: Renamed from Source/WebCore/html/canvas/WebGPURenderPassAttachmentDescriptor.cpp.
(WebCore::WebMetalRenderPassAttachmentDescriptor::WebMetalRenderPassAttachmentDescriptor):
(WebCore::WebMetalRenderPassAttachmentDescriptor::loadAction const):
(WebCore::WebMetalRenderPassAttachmentDescriptor::setLoadAction):
(WebCore::WebMetalRenderPassAttachmentDescriptor::storeAction const):
(WebCore::WebMetalRenderPassAttachmentDescriptor::setStoreAction):
(WebCore::WebMetalRenderPassAttachmentDescriptor::texture const):
(WebCore::WebMetalRenderPassAttachmentDescriptor::setTexture):
* html/canvas/WebMetalRenderPassAttachmentDescriptor.h: Renamed from Source/WebCore/html/canvas/WebGPURenderPassAttachmentDescriptor.h.
* html/canvas/WebMetalRenderPassAttachmentDescriptor.idl: Renamed from Source/WebCore/html/canvas/WebGPURenderPassAttachmentDescriptor.idl.
* html/canvas/WebMetalRenderPassColorAttachmentDescriptor.cpp: Renamed from Source/WebCore/html/canvas/WebGPURenderPassColorAttachmentDescriptor.cpp.
(WebCore::WebMetalRenderPassColorAttachmentDescriptor::create):
(WebCore::WebMetalRenderPassColorAttachmentDescriptor::WebMetalRenderPassColorAttachmentDescriptor):
(WebCore::WebMetalRenderPassColorAttachmentDescriptor::descriptor const):
(WebCore::WebMetalRenderPassColorAttachmentDescriptor::clearColor const):
(WebCore::WebMetalRenderPassColorAttachmentDescriptor::setClearColor):
* html/canvas/WebMetalRenderPassColorAttachmentDescriptor.h: Renamed from Source/WebCore/html/canvas/WebGPURenderPassColorAttachmentDescriptor.h.
* html/canvas/WebMetalRenderPassColorAttachmentDescriptor.idl: Renamed from Source/WebCore/html/canvas/WebGPURenderPassColorAttachmentDescriptor.idl.
* html/canvas/WebMetalRenderPassDepthAttachmentDescriptor.cpp: Renamed from Source/WebCore/html/canvas/WebGPURenderPassDepthAttachmentDescriptor.cpp.
(WebCore::WebMetalRenderPassDepthAttachmentDescriptor::create):
(WebCore::WebMetalRenderPassDepthAttachmentDescriptor::WebMetalRenderPassDepthAttachmentDescriptor):
(WebCore::WebMetalRenderPassDepthAttachmentDescriptor::clearDepth const):
(WebCore::WebMetalRenderPassDepthAttachmentDescriptor::setClearDepth):
(WebCore::WebMetalRenderPassDepthAttachmentDescriptor::descriptor const):
* html/canvas/WebMetalRenderPassDepthAttachmentDescriptor.h: Renamed from Source/WebCore/html/canvas/WebGPURenderPassDepthAttachmentDescriptor.h.
* html/canvas/WebMetalRenderPassDepthAttachmentDescriptor.idl: Renamed from Source/WebCore/html/canvas/WebGPURenderPassDepthAttachmentDescriptor.idl.
* html/canvas/WebMetalRenderPassDescriptor.cpp: Renamed from Source/WebCore/html/canvas/WebGPURenderPassDescriptor.cpp.
(WebCore::WebMetalRenderPassDescriptor::create):
(WebCore::WebMetalRenderPassDescriptor::depthAttachment):
(WebCore::WebMetalRenderPassDescriptor::colorAttachments):
* html/canvas/WebMetalRenderPassDescriptor.h: Renamed from Source/WebCore/html/canvas/WebGPURenderPassDescriptor.h.
* html/canvas/WebMetalRenderPassDescriptor.idl: Renamed from Source/WebCore/html/canvas/WebGPURenderPassDescriptor.idl.
* html/canvas/WebMetalRenderPipelineColorAttachmentDescriptor.cpp: Renamed from Source/WebCore/html/canvas/WebGPURenderPipelineColorAttachmentDescriptor.cpp.
(WebCore::WebMetalRenderPipelineColorAttachmentDescriptor::create):
(WebCore::WebMetalRenderPipelineColorAttachmentDescriptor::WebMetalRenderPipelineColorAttachmentDescriptor):
(WebCore::WebMetalRenderPipelineColorAttachmentDescriptor::pixelFormat const):
(WebCore::WebMetalRenderPipelineColorAttachmentDescriptor::setPixelFormat):
* html/canvas/WebMetalRenderPipelineColorAttachmentDescriptor.h: Renamed from Source/WebCore/html/canvas/WebGPURenderPipelineColorAttachmentDescriptor.h.
* html/canvas/WebMetalRenderPipelineColorAttachmentDescriptor.idl: Renamed from Source/WebCore/html/canvas/WebGPURenderPipelineColorAttachmentDescriptor.idl.
* html/canvas/WebMetalRenderPipelineDescriptor.cpp: Renamed from Source/WebCore/html/canvas/WebGPURenderPipelineDescriptor.cpp.
(WebCore::WebMetalRenderPipelineDescriptor::create):
(WebCore::WebMetalRenderPipelineDescriptor::vertexFunction const):
(WebCore::WebMetalRenderPipelineDescriptor::setVertexFunction):
(WebCore::WebMetalRenderPipelineDescriptor::fragmentFunction const):
(WebCore::WebMetalRenderPipelineDescriptor::setFragmentFunction):
(WebCore::WebMetalRenderPipelineDescriptor::colorAttachments):
(WebCore::WebMetalRenderPipelineDescriptor::depthAttachmentPixelFormat const):
(WebCore::WebMetalRenderPipelineDescriptor::setDepthAttachmentPixelFormat):
(WebCore::WebMetalRenderPipelineDescriptor::reset):
* html/canvas/WebMetalRenderPipelineDescriptor.h: Renamed from Source/WebCore/html/canvas/WebGPURenderPipelineDescriptor.h.
* html/canvas/WebMetalRenderPipelineDescriptor.idl: Renamed from Source/WebCore/html/canvas/WebGPURenderPipelineDescriptor.idl.
* html/canvas/WebMetalRenderPipelineState.cpp: Renamed from Source/WebCore/html/canvas/WebGPURenderPipelineState.cpp.
(WebCore::WebMetalRenderPipelineState::create):
(WebCore::WebMetalRenderPipelineState::WebMetalRenderPipelineState):
(WebCore::WebMetalRenderPipelineState::label const):
(WebCore::WebMetalRenderPipelineState::setLabel):
* html/canvas/WebMetalRenderPipelineState.h: Renamed from Source/WebCore/html/canvas/WebGPURenderPipelineState.h.
* html/canvas/WebMetalRenderPipelineState.idl: Renamed from Source/WebCore/html/canvas/WebGPUDepthStencilState.idl.
* html/canvas/WebMetalRenderingContext.cpp: Added.
(WebCore::WebMetalRenderingContext::create):
(WebCore::WebMetalRenderingContext::WebMetalRenderingContext):
(WebCore::WebMetalRenderingContext::canvas const):
(WebCore::WebMetalRenderingContext::initializeNewContext):
(WebCore::WebMetalRenderingContext::clampedCanvasSize const):
(WebCore::WebMetalRenderingContext::hasPendingActivity const):
(WebCore::WebMetalRenderingContext::stop):
(WebCore::WebMetalRenderingContext::activeDOMObjectName const):
(WebCore::WebMetalRenderingContext::canSuspendForDocumentSuspension const):
(WebCore::WebMetalRenderingContext::platformLayer const):
(WebCore::WebMetalRenderingContext::markLayerComposited):
(WebCore::WebMetalRenderingContext::reshape):
(WebCore::WebMetalRenderingContext::createLibrary):
(WebCore::WebMetalRenderingContext::createRenderPipelineState):
(WebCore::WebMetalRenderingContext::createDepthStencilState):
(WebCore::WebMetalRenderingContext::createComputePipelineState):
(WebCore::WebMetalRenderingContext::createCommandQueue):
(WebCore::WebMetalRenderingContext::nextDrawable):
(WebCore::WebMetalRenderingContext::createBuffer):
(WebCore::WebMetalRenderingContext::createTexture):
* html/canvas/WebMetalRenderingContext.h: Renamed from Source/WebCore/html/canvas/WebGPURenderingContext.h.
* html/canvas/WebMetalRenderingContext.idl: Renamed from Source/WebCore/html/canvas/WebGPURenderingContext.idl.
* html/canvas/WebMetalSize.h: Renamed from Source/WebCore/html/canvas/WebGPUSize.h.
* html/canvas/WebMetalSize.idl: Renamed from Source/WebCore/html/canvas/WebGPUSize.idl.
* html/canvas/WebMetalTexture.cpp: Renamed from Source/WebCore/html/canvas/WebGPUTexture.cpp.
(WebCore::WebMetalTexture::create):
(WebCore::WebMetalTexture::WebMetalTexture):
* html/canvas/WebMetalTexture.h: Renamed from Source/WebCore/html/canvas/WebGPUTexture.h.
* html/canvas/WebMetalTexture.idl: Renamed from Source/WebCore/html/canvas/WebGPUTexture.idl.
* html/canvas/WebMetalTextureDescriptor.cpp: Renamed from Source/WebCore/html/canvas/WebGPUTextureDescriptor.cpp.
(WebCore::WebMetalTextureDescriptor::create):
(WebCore::WebMetalTextureDescriptor::WebMetalTextureDescriptor):
(WebCore::WebMetalTextureDescriptor::width const):
(WebCore::WebMetalTextureDescriptor::setWidth):
(WebCore::WebMetalTextureDescriptor::height const):
(WebCore::WebMetalTextureDescriptor::setHeight):
(WebCore::WebMetalTextureDescriptor::sampleCount const):
(WebCore::WebMetalTextureDescriptor::setSampleCount):
(WebCore::WebMetalTextureDescriptor::textureType const):
(WebCore::WebMetalTextureDescriptor::setTextureType):
(WebCore::WebMetalTextureDescriptor::storageMode const):
(WebCore::WebMetalTextureDescriptor::setStorageMode):
(WebCore::WebMetalTextureDescriptor::usage const):
(WebCore::WebMetalTextureDescriptor::setUsage):
* html/canvas/WebMetalTextureDescriptor.h: Renamed from Source/WebCore/html/canvas/WebGPUTextureDescriptor.h.
* html/canvas/WebMetalTextureDescriptor.idl: Renamed from Source/WebCore/html/canvas/WebGPUTextureDescriptor.idl.
* inspector/InspectorCanvas.cpp:
(WebCore::InspectorCanvas::buildObjectForCanvas):
* inspector/agents/InspectorCanvasAgent.cpp:
(WebCore::InspectorCanvasAgent::requestContent):
(WebCore::contextAsScriptValue):
* page/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setWebMetalEnabled):
(WebCore::RuntimeEnabledFeatures::webMetalEnabled const):
(WebCore::RuntimeEnabledFeatures::setWebGPUEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::webGPUEnabled const): Deleted.
* platform/Logging.h:
* platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
(WebCore::PlatformCALayerCocoa::layerTypeForPlatformLayer):
(WebCore::PlatformCALayerCocoa::PlatformCALayerCocoa):
* platform/graphics/cocoa/WebMetalLayer.h: Renamed from Source/WebCore/platform/graphics/cocoa/WebGPULayer.h.
* platform/graphics/cocoa/WebMetalLayer.mm: Renamed from Source/WebCore/platform/graphics/cocoa/WebGPULayer.mm.
(-[WebMetalLayer initWithGPUDevice:]):
* platform/graphics/gpu/GPUBuffer.cpp:
(WebCore::GPUBuffer::~GPUBuffer):
* platform/graphics/gpu/GPUBuffer.h:
* platform/graphics/gpu/GPUCommandBuffer.cpp:
(WebCore::GPUCommandBuffer::~GPUCommandBuffer):
* platform/graphics/gpu/GPUCommandBuffer.h:
* platform/graphics/gpu/GPUCommandQueue.cpp:
(WebCore::GPUCommandQueue::~GPUCommandQueue):
* platform/graphics/gpu/GPUCommandQueue.h:
* platform/graphics/gpu/GPUComputeCommandEncoder.cpp:
(WebCore::GPUComputeCommandEncoder::~GPUComputeCommandEncoder):
* platform/graphics/gpu/GPUComputeCommandEncoder.h:
* platform/graphics/gpu/GPUComputePipelineState.cpp:
(WebCore::GPUComputePipelineState::~GPUComputePipelineState):
* platform/graphics/gpu/GPUComputePipelineState.h:
* platform/graphics/gpu/GPUDepthStencilDescriptor.cpp:
(WebCore::GPUDepthStencilDescriptor::~GPUDepthStencilDescriptor):
* platform/graphics/gpu/GPUDepthStencilDescriptor.h:
* platform/graphics/gpu/GPUDepthStencilState.cpp:
(WebCore::GPUDepthStencilState::~GPUDepthStencilState):
* platform/graphics/gpu/GPUDepthStencilState.h:
* platform/graphics/gpu/GPUDevice.cpp:
(WebCore::GPUDevice::~GPUDevice):
* platform/graphics/gpu/GPUDevice.h:
(WebCore::GPUDevice::layer const):
* platform/graphics/gpu/GPUDrawable.cpp:
(WebCore::GPUDrawable::~GPUDrawable):
* platform/graphics/gpu/GPUDrawable.h:
* platform/graphics/gpu/GPUEnums.h:
* platform/graphics/gpu/GPUFunction.cpp:
(WebCore::GPUFunction::~GPUFunction):
* platform/graphics/gpu/GPUFunction.h:
* platform/graphics/gpu/GPULibrary.cpp:
(WebCore::GPULibrary::~GPULibrary):
* platform/graphics/gpu/GPULibrary.h:
* platform/graphics/gpu/GPURenderCommandEncoder.cpp:
(WebCore::GPURenderCommandEncoder::~GPURenderCommandEncoder):
* platform/graphics/gpu/GPURenderCommandEncoder.h:
* platform/graphics/gpu/GPURenderPassAttachmentDescriptor.cpp:
(WebCore::GPURenderPassAttachmentDescriptor::~GPURenderPassAttachmentDescriptor):
* platform/graphics/gpu/GPURenderPassAttachmentDescriptor.h:
* platform/graphics/gpu/GPURenderPassColorAttachmentDescriptor.cpp:
(WebCore::GPURenderPassColorAttachmentDescriptor::~GPURenderPassColorAttachmentDescriptor):
* platform/graphics/gpu/GPURenderPassColorAttachmentDescriptor.h:
* platform/graphics/gpu/GPURenderPassDepthAttachmentDescriptor.cpp:
(WebCore::GPURenderPassDepthAttachmentDescriptor::~GPURenderPassDepthAttachmentDescriptor):
* platform/graphics/gpu/GPURenderPassDepthAttachmentDescriptor.h:
* platform/graphics/gpu/GPURenderPassDescriptor.cpp:
(WebCore::GPURenderPassDescriptor::~GPURenderPassDescriptor):
* platform/graphics/gpu/GPURenderPassDescriptor.h:
* platform/graphics/gpu/GPURenderPipelineColorAttachmentDescriptor.cpp:
(WebCore::GPURenderPipelineColorAttachmentDescriptor::~GPURenderPipelineColorAttachmentDescriptor):
* platform/graphics/gpu/GPURenderPipelineColorAttachmentDescriptor.h:
* platform/graphics/gpu/GPURenderPipelineDescriptor.cpp:
(WebCore::GPURenderPipelineDescriptor::~GPURenderPipelineDescriptor):
* platform/graphics/gpu/GPURenderPipelineDescriptor.h:
* platform/graphics/gpu/GPURenderPipelineState.cpp:
(WebCore::GPURenderPipelineState::~GPURenderPipelineState):
* platform/graphics/gpu/GPURenderPipelineState.h:
* platform/graphics/gpu/GPUSize.h:
* platform/graphics/gpu/GPUTexture.cpp:
(WebCore::GPUTexture::~GPUTexture):
* platform/graphics/gpu/GPUTexture.h:
* platform/graphics/gpu/GPUTextureDescriptor.cpp:
(WebCore::GPUTextureDescriptor::~GPUTextureDescriptor):
* platform/graphics/gpu/GPUTextureDescriptor.h:
* platform/graphics/metal/GPUBufferMetal.mm:
(WebCore::GPUBuffer::GPUBuffer):
* platform/graphics/metal/GPUCommandBufferMetal.mm:
* platform/graphics/metal/GPUCommandQueueMetal.mm:
* platform/graphics/metal/GPUComputeCommandEncoderMetal.mm:
* platform/graphics/metal/GPUComputePipelineStateMetal.mm:
(WebCore::GPUComputePipelineState::GPUComputePipelineState):
* platform/graphics/metal/GPUDepthStencilDescriptorMetal.mm:
* platform/graphics/metal/GPUDepthStencilStateMetal.mm:
(WebCore::GPUDepthStencilState::setLabel const):
* platform/graphics/metal/GPUDeviceMetal.mm:
(WebCore::GPUDevice::reshape const):
* platform/graphics/metal/GPUDrawableMetal.mm:
(WebCore::GPUDrawable::release):
* platform/graphics/metal/GPUFunctionMetal.mm:
* platform/graphics/metal/GPULibraryMetal.mm:
(WebCore::GPULibrary::GPULibrary):
* platform/graphics/metal/GPURenderCommandEncoderMetal.mm:
(WebCore::GPURenderCommandEncoder::GPURenderCommandEncoder):
* platform/graphics/metal/GPURenderPassAttachmentDescriptorMetal.mm:
* platform/graphics/metal/GPURenderPassColorAttachmentDescriptorMetal.mm:
* platform/graphics/metal/GPURenderPassDepthAttachmentDescriptorMetal.mm:
* platform/graphics/metal/GPURenderPassDescriptorMetal.mm:
* platform/graphics/metal/GPURenderPipelineColorAttachmentDescriptorMetal.mm:
* platform/graphics/metal/GPURenderPipelineDescriptorMetal.mm:
* platform/graphics/metal/GPURenderPipelineStateMetal.mm:
(WebCore::GPURenderPipelineState::setLabel const):
* platform/graphics/metal/GPUTextureDescriptorMetal.mm:
* platform/graphics/metal/GPUTextureMetal.mm:
(WebCore::GPUTexture::GPUTexture):
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::Backup::Backup):
(WebCore::InternalSettings::Backup::restoreTo):
(WebCore::InternalSettings::setWebMetalEnabled):
(WebCore::InternalSettings::setWebGPUEnabled): Deleted.
* testing/InternalSettings.h:
* testing/InternalSettings.idl:

Source/WebCore/PAL:

<rdar://problem/44990443>

Reviewed by Dean Jackson.

Rename WebGPU prototype files to WebMetal in preparation for implementing the new (Oct 2018) WebGPU interface.

* Configurations/FeatureDefines.xcconfig:

Source/WebInspectorUI:

<rdar://problem/44990443>

Reviewed by Dean Jackson.

Rename WebGPU prototype files to WebMetal in preparation for implementing the new (Oct 2018) WebGPU interface.
For WebInspector, add WebMetal to valid enums for canvas types.

* UserInterface/Models/Canvas.js:
(WI.Canvas.fromPayload):
(WI.Canvas.displayNameForContextType):

Source/WebKit:

<rdar://problem/44990443>

Reviewed by Dean Jackson.

Rename WebGPU prototype files to WebMetal in preparation for implementing the new (Oct 2018) WebGPU interface.

* Configurations/FeatureDefines.xcconfig:
* Shared/WebPreferences.yaml:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):

Source/WebKitLegacy/mac:

<rdar://problem/44990443>

Reviewed by Dean Jackson.

Rename WebGPU prototype files to WebMetal in preparation for implementing the new (Oct 2018) WebGPU interface.

* Configurations/FeatureDefines.xcconfig:
* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences webMetalEnabled]):
(-[WebPreferences setWebMetalEnabled:]):
(-[WebPreferences webGPUEnabled]): Deleted.
(-[WebPreferences setWebGPUEnabled:]): Deleted.
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

Tools:

<rdar://problem/44990443>

Reviewed by Dean Jackson.

Rename WebGPU prototype files to WebMetal in preparation for implementing the new (Oct 2018) WebGPU interface.

* DumpRenderTree/mac/DumpRenderTree.mm:
(enableExperimentalFeatures):
(resetWebPreferencesToConsistentValues):
* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
* TestWebKitAPI/Tests/WebCore/mac/GPUBuffer.mm:
* TestWebKitAPI/Tests/WebCore/mac/GPUCommandQueue.mm:
* TestWebKitAPI/Tests/WebCore/mac/GPUDevice.mm:
* TestWebKitAPI/Tests/WebCore/mac/GPUFunction.mm:
* TestWebKitAPI/Tests/WebCore/mac/GPULibrary.mm:
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::beginTesting):
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setWebMetalEnabled):
(WTR::TestRunner::setWebGPUEnabled): Deleted.
* WebKitTestRunner/InjectedBundle/TestRunner.h:

Websites/webkit.org:

<rdar://problem/44990443>

Reviewed by Dean Jackson.

Rename WebGPU prototype files to WebMetal in preparation for implementing the new (Oct 2018) WebGPU interface.

* demos/webgpu/shared.js: Removed.
* demos/webmetal/2d.html: Renamed from Websites/webkit.org/demos/webgpu/2d.html.
* demos/webmetal/2d.jpg: Renamed from Websites/webkit.org/demos/webgpu/2d.jpg.
* demos/webmetal/2d.js: Renamed from Websites/webkit.org/demos/webgpu/2d.js.
(init):
* demos/webmetal/circle.svg: Renamed from Websites/webkit.org/demos/webgpu/circle.svg.
* demos/webmetal/cubes.html: Renamed from Websites/webkit.org/demos/webgpu/cubes.html.
* demos/webmetal/cubes.jpg: Renamed from Websites/webkit.org/demos/webgpu/cubes.jpg.
* demos/webmetal/cubes.js: Renamed from Websites/webkit.org/demos/webgpu/cubes.js.
(init):
* demos/webmetal/gl-matrix-min.js: Renamed from Websites/webkit.org/demos/webgpu/gl-matrix-min.js.
* demos/webmetal/hello.html: Renamed from Websites/webkit.org/demos/webgpu/hello.html.
* demos/webmetal/hello.jpg: Renamed from Websites/webkit.org/demos/webgpu/hello.jpg.
* demos/webmetal/hello.js: Renamed from Websites/webkit.org/demos/webgpu/hello.js.
(init):
* demos/webmetal/index.html: Renamed from Websites/webkit.org/demos/webgpu/index.html.
* demos/webmetal/shared.css: Renamed from Websites/webkit.org/demos/webgpu/shared.css.
* demos/webmetal/shared.js: Added.
(const.hasWebMetal):
(const.checkForWebMetal):
* demos/webmetal/simple.html: Renamed from Websites/webkit.org/demos/webgpu/simple.html.
* demos/webmetal/simple.jpg: Renamed from Websites/webkit.org/demos/webgpu/simple.jpg.
* demos/webmetal/simple.js: Renamed from Websites/webkit.org/demos/webgpu/simple.js.
(init):
* experimental-features.html:

LayoutTests:

<rdar://problem/44990443>

Reviewed by Dean Jackson.

Rename WebGPU prototype files to WebMetal in preparation for implementing the new (Oct 2018) WebGPU interface.

* fast/canvas/webgpu/webgpu-runtime-flag-expected.txt: Removed.
* fast/canvas/webmetal/webmetal-dispatch-expected.txt: Renamed from LayoutTests/fast/canvas/webgpu/webgpu-dispatch-expected.txt.
* fast/canvas/webmetal/webmetal-dispatch.html: Renamed from LayoutTests/fast/canvas/webgpu/webgpu-dispatch.html.
* fast/canvas/webmetal/webmetal-runtime-flag-expected.txt: Added.
* fast/canvas/webmetal/webmetal-runtime-flag.html: Renamed from LayoutTests/fast/canvas/webgpu/webgpu-runtime-flag.html.
* inspector/canvas/create-context-webmetal-expected.txt: Renamed from LayoutTests/inspector/canvas/create-context-webgpu-expected.txt.
* inspector/canvas/create-context-webmetal.html: Renamed from LayoutTests/inspector/canvas/create-context-webgpu.html.
* inspector/canvas/resolveCanvasContext-webgpu-expected.txt: Removed.
* inspector/canvas/resolveCanvasContext-webmetal-expected.txt: Added.
* inspector/canvas/resolveCanvasContext-webmetal.html: Renamed from LayoutTests/inspector/canvas/resolveCanvasContext-webgpu.html.
* platform/gtk/TestExpectations:
* platform/ios/TestExpectations:
* platform/mac/TestExpectations:
* platform/win/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@236954 268f45cc-cd09-0410-ab3c-d52691b4dbfc

227 files changed:
ChangeLog
LayoutTests/ChangeLog
LayoutTests/fast/canvas/webgpu/webgpu-runtime-flag-expected.txt [deleted file]
LayoutTests/fast/canvas/webmetal/webmetal-dispatch-expected.txt [moved from LayoutTests/fast/canvas/webgpu/webgpu-dispatch-expected.txt with 100% similarity]
LayoutTests/fast/canvas/webmetal/webmetal-dispatch.html [moved from LayoutTests/fast/canvas/webgpu/webgpu-dispatch.html with 95% similarity]
LayoutTests/fast/canvas/webmetal/webmetal-runtime-flag-expected.txt [new file with mode: 0644]
LayoutTests/fast/canvas/webmetal/webmetal-runtime-flag.html [moved from LayoutTests/fast/canvas/webgpu/webgpu-runtime-flag.html with 54% similarity]
LayoutTests/inspector/canvas/create-context-webmetal-expected.txt [moved from LayoutTests/inspector/canvas/create-context-webgpu-expected.txt with 68% similarity]
LayoutTests/inspector/canvas/create-context-webmetal.html [moved from LayoutTests/inspector/canvas/create-context-webgpu.html with 57% similarity]
LayoutTests/inspector/canvas/resolveCanvasContext-webgpu-expected.txt [deleted file]
LayoutTests/inspector/canvas/resolveCanvasContext-webmetal-expected.txt [new file with mode: 0644]
LayoutTests/inspector/canvas/resolveCanvasContext-webmetal.html [moved from LayoutTests/inspector/canvas/resolveCanvasContext-webgpu.html with 72% similarity]
LayoutTests/platform/gtk/TestExpectations
LayoutTests/platform/ios/TestExpectations
LayoutTests/platform/mac/TestExpectations
LayoutTests/platform/win/TestExpectations
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig
Source/JavaScriptCore/inspector/protocol/Canvas.json
Source/JavaScriptCore/inspector/scripts/codegen/generator.py
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/Configurations/FeatureDefines.xcconfig
Source/WebCore/DerivedSources.make
Source/WebCore/PAL/ChangeLog
Source/WebCore/PAL/Configurations/FeatureDefines.xcconfig
Source/WebCore/Sources.txt
Source/WebCore/SourcesCocoa.txt
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/bindings/js/JSWebMetalRenderPassAttachmentDescriptorCustom.cpp [moved from Source/WebCore/bindings/js/JSWebGPURenderPassAttachmentDescriptorCustom.cpp with 72% similarity]
Source/WebCore/bindings/js/JSWebMetalRenderingContextCustom.cpp [moved from Source/WebCore/bindings/js/JSWebGPURenderingContextCustom.cpp with 91% similarity]
Source/WebCore/bindings/js/WebCoreBuiltinNames.h
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/Document.h
Source/WebCore/dom/Document.idl
Source/WebCore/html/HTMLCanvasElement.cpp
Source/WebCore/html/HTMLCanvasElement.h
Source/WebCore/html/HTMLCanvasElement.idl
Source/WebCore/html/canvas/CanvasRenderingContext.h
Source/WebCore/html/canvas/WebGPURenderingContext.cpp [deleted file]
Source/WebCore/html/canvas/WebMetalBuffer.cpp [moved from Source/WebCore/html/canvas/WebGPUBuffer.cpp with 87% similarity]
Source/WebCore/html/canvas/WebMetalBuffer.h [moved from Source/WebCore/html/canvas/WebGPUBuffer.h with 90% similarity]
Source/WebCore/html/canvas/WebMetalBuffer.idl [moved from Source/WebCore/html/canvas/WebGPUBuffer.idl with 94% similarity]
Source/WebCore/html/canvas/WebMetalCommandBuffer.cpp [moved from Source/WebCore/html/canvas/WebGPUCommandBuffer.cpp with 56% similarity]
Source/WebCore/html/canvas/WebMetalCommandBuffer.h [moved from Source/WebCore/html/canvas/WebGPUCommandBuffer.h with 74% similarity]
Source/WebCore/html/canvas/WebMetalCommandBuffer.idl [moved from Source/WebCore/html/canvas/WebGPUCommandBuffer.idl with 82% similarity]
Source/WebCore/html/canvas/WebMetalCommandQueue.cpp [moved from Source/WebCore/html/canvas/WebGPUCommandQueue.cpp with 75% similarity]
Source/WebCore/html/canvas/WebMetalCommandQueue.h [moved from Source/WebCore/html/canvas/WebGPUCommandQueue.h with 83% similarity]
Source/WebCore/html/canvas/WebMetalCommandQueue.idl [moved from Source/WebCore/html/canvas/WebGPUCommandQueue.idl with 90% similarity]
Source/WebCore/html/canvas/WebMetalComputeCommandEncoder.cpp [moved from Source/WebCore/html/canvas/WebGPUComputeCommandEncoder.cpp with 68% similarity]
Source/WebCore/html/canvas/WebMetalComputeCommandEncoder.h [moved from Source/WebCore/html/canvas/WebGPUComputeCommandEncoder.h with 75% similarity]
Source/WebCore/html/canvas/WebMetalComputeCommandEncoder.idl [moved from Source/WebCore/html/canvas/WebGPUComputeCommandEncoder.idl with 79% similarity]
Source/WebCore/html/canvas/WebMetalComputePipelineState.cpp [moved from Source/WebCore/html/canvas/WebGPUComputePipelineState.cpp with 81% similarity]
Source/WebCore/html/canvas/WebMetalComputePipelineState.h [moved from Source/WebCore/html/canvas/WebGPUComputePipelineState.h with 85% similarity]
Source/WebCore/html/canvas/WebMetalComputePipelineState.idl [moved from Source/WebCore/html/canvas/WebGPUComputePipelineState.idl with 93% similarity]
Source/WebCore/html/canvas/WebMetalDepthStencilDescriptor.cpp [moved from Source/WebCore/html/canvas/WebGPUDepthStencilDescriptor.cpp with 76% similarity]
Source/WebCore/html/canvas/WebMetalDepthStencilDescriptor.h [moved from Source/WebCore/html/canvas/WebGPUDepthStencilDescriptor.h with 84% similarity]
Source/WebCore/html/canvas/WebMetalDepthStencilDescriptor.idl [moved from Source/WebCore/html/canvas/WebGPUDepthStencilDescriptor.idl with 86% similarity]
Source/WebCore/html/canvas/WebMetalDepthStencilState.cpp [moved from Source/WebCore/html/canvas/WebGPUDepthStencilState.cpp with 77% similarity]
Source/WebCore/html/canvas/WebMetalDepthStencilState.h [moved from Source/WebCore/html/canvas/WebGPUDepthStencilState.h with 87% similarity]
Source/WebCore/html/canvas/WebMetalDepthStencilState.idl [moved from Source/WebCore/html/canvas/WebGPURenderPipelineState.idl with 93% similarity]
Source/WebCore/html/canvas/WebMetalDrawable.cpp [moved from Source/WebCore/html/canvas/WebGPUDrawable.cpp with 79% similarity]
Source/WebCore/html/canvas/WebMetalDrawable.h [moved from Source/WebCore/html/canvas/WebGPUDrawable.h with 82% similarity]
Source/WebCore/html/canvas/WebMetalDrawable.idl [moved from Source/WebCore/html/canvas/WebGPUDrawable.idl with 88% similarity]
Source/WebCore/html/canvas/WebMetalEnums.cpp [moved from Source/WebCore/html/canvas/WebGPUEnums.cpp with 64% similarity]
Source/WebCore/html/canvas/WebMetalEnums.h [moved from Source/WebCore/html/canvas/WebGPUEnums.h with 85% similarity]
Source/WebCore/html/canvas/WebMetalEnums.idl [moved from Source/WebCore/html/canvas/WebGPUEnums.idl with 59% similarity]
Source/WebCore/html/canvas/WebMetalFunction.cpp [moved from Source/WebCore/html/canvas/WebGPUFunction.cpp with 84% similarity]
Source/WebCore/html/canvas/WebMetalFunction.h [moved from Source/WebCore/html/canvas/WebGPUFunction.h with 90% similarity]
Source/WebCore/html/canvas/WebMetalFunction.idl [moved from Source/WebCore/html/canvas/WebGPUFunction.idl with 94% similarity]
Source/WebCore/html/canvas/WebMetalLibrary.cpp [moved from Source/WebCore/html/canvas/WebGPULibrary.cpp with 75% similarity]
Source/WebCore/html/canvas/WebMetalLibrary.h [moved from Source/WebCore/html/canvas/WebGPULibrary.h with 84% similarity]
Source/WebCore/html/canvas/WebMetalLibrary.idl [moved from Source/WebCore/html/canvas/WebGPULibrary.idl with 91% similarity]
Source/WebCore/html/canvas/WebMetalRenderCommandEncoder.cpp [moved from Source/WebCore/html/canvas/WebGPURenderCommandEncoder.cpp with 61% similarity]
Source/WebCore/html/canvas/WebMetalRenderCommandEncoder.h [moved from Source/WebCore/html/canvas/WebGPURenderCommandEncoder.h with 72% similarity]
Source/WebCore/html/canvas/WebMetalRenderCommandEncoder.idl [moved from Source/WebCore/html/canvas/WebGPURenderCommandEncoder.idl with 78% similarity]
Source/WebCore/html/canvas/WebMetalRenderPassAttachmentDescriptor.cpp [moved from Source/WebCore/html/canvas/WebGPURenderPassAttachmentDescriptor.cpp with 71% similarity]
Source/WebCore/html/canvas/WebMetalRenderPassAttachmentDescriptor.h [moved from Source/WebCore/html/canvas/WebGPURenderPassAttachmentDescriptor.h with 82% similarity]
Source/WebCore/html/canvas/WebMetalRenderPassAttachmentDescriptor.idl [moved from Source/WebCore/html/canvas/WebGPURenderPassAttachmentDescriptor.idl with 82% similarity]
Source/WebCore/html/canvas/WebMetalRenderPassColorAttachmentDescriptor.cpp [moved from Source/WebCore/html/canvas/WebGPURenderPassColorAttachmentDescriptor.cpp with 64% similarity]
Source/WebCore/html/canvas/WebMetalRenderPassColorAttachmentDescriptor.h [moved from Source/WebCore/html/canvas/WebGPURenderPassColorAttachmentDescriptor.h with 79% similarity]
Source/WebCore/html/canvas/WebMetalRenderPassColorAttachmentDescriptor.idl [moved from Source/WebCore/html/canvas/WebGPURenderPassColorAttachmentDescriptor.idl with 89% similarity]
Source/WebCore/html/canvas/WebMetalRenderPassDepthAttachmentDescriptor.cpp [moved from Source/WebCore/html/canvas/WebGPURenderPassDepthAttachmentDescriptor.cpp with 64% similarity]
Source/WebCore/html/canvas/WebMetalRenderPassDepthAttachmentDescriptor.h [moved from Source/WebCore/html/canvas/WebGPURenderPassDepthAttachmentDescriptor.h with 79% similarity]
Source/WebCore/html/canvas/WebMetalRenderPassDepthAttachmentDescriptor.idl [moved from Source/WebCore/html/canvas/WebGPURenderPassDepthAttachmentDescriptor.idl with 89% similarity]
Source/WebCore/html/canvas/WebMetalRenderPassDescriptor.cpp [moved from Source/WebCore/html/canvas/WebGPURenderPassDescriptor.cpp with 69% similarity]
Source/WebCore/html/canvas/WebMetalRenderPassDescriptor.h [moved from Source/WebCore/html/canvas/WebGPURenderPassDescriptor.h with 71% similarity]
Source/WebCore/html/canvas/WebMetalRenderPassDescriptor.idl [moved from Source/WebCore/html/canvas/WebGPURenderPassDescriptor.idl with 79% similarity]
Source/WebCore/html/canvas/WebMetalRenderPipelineColorAttachmentDescriptor.cpp [moved from Source/WebCore/html/canvas/WebGPURenderPipelineColorAttachmentDescriptor.cpp with 69% similarity]
Source/WebCore/html/canvas/WebMetalRenderPipelineColorAttachmentDescriptor.h [moved from Source/WebCore/html/canvas/WebGPURenderPipelineColorAttachmentDescriptor.h with 81% similarity]
Source/WebCore/html/canvas/WebMetalRenderPipelineColorAttachmentDescriptor.idl [moved from Source/WebCore/html/canvas/WebGPURenderPipelineColorAttachmentDescriptor.idl with 92% similarity]
Source/WebCore/html/canvas/WebMetalRenderPipelineDescriptor.cpp [moved from Source/WebCore/html/canvas/WebGPURenderPipelineDescriptor.cpp with 66% similarity]
Source/WebCore/html/canvas/WebMetalRenderPipelineDescriptor.h [moved from Source/WebCore/html/canvas/WebGPURenderPipelineDescriptor.h with 67% similarity]
Source/WebCore/html/canvas/WebMetalRenderPipelineDescriptor.idl [moved from Source/WebCore/html/canvas/WebGPURenderPipelineDescriptor.idl with 82% similarity]
Source/WebCore/html/canvas/WebMetalRenderPipelineState.cpp [moved from Source/WebCore/html/canvas/WebGPURenderPipelineState.cpp with 77% similarity]
Source/WebCore/html/canvas/WebMetalRenderPipelineState.h [moved from Source/WebCore/html/canvas/WebGPURenderPipelineState.h with 86% similarity]
Source/WebCore/html/canvas/WebMetalRenderPipelineState.idl [moved from Source/WebCore/html/canvas/WebGPUDepthStencilState.idl with 93% similarity]
Source/WebCore/html/canvas/WebMetalRenderingContext.cpp [new file with mode: 0644]
Source/WebCore/html/canvas/WebMetalRenderingContext.h [moved from Source/WebCore/html/canvas/WebGPURenderingContext.h with 62% similarity]
Source/WebCore/html/canvas/WebMetalRenderingContext.idl [moved from Source/WebCore/html/canvas/WebGPURenderingContext.idl with 84% similarity]
Source/WebCore/html/canvas/WebMetalSize.h [moved from Source/WebCore/html/canvas/WebGPUSize.h with 97% similarity]
Source/WebCore/html/canvas/WebMetalSize.idl [moved from Source/WebCore/html/canvas/WebGPUSize.idl with 94% similarity]
Source/WebCore/html/canvas/WebMetalTexture.cpp [moved from Source/WebCore/html/canvas/WebGPUTexture.cpp with 86% similarity]
Source/WebCore/html/canvas/WebMetalTexture.h [moved from Source/WebCore/html/canvas/WebGPUTexture.h with 90% similarity]
Source/WebCore/html/canvas/WebMetalTexture.idl [moved from Source/WebCore/html/canvas/WebGPUTexture.idl with 94% similarity]
Source/WebCore/html/canvas/WebMetalTextureDescriptor.cpp [moved from Source/WebCore/html/canvas/WebGPUTextureDescriptor.cpp with 64% similarity]
Source/WebCore/html/canvas/WebMetalTextureDescriptor.h [moved from Source/WebCore/html/canvas/WebGPUTextureDescriptor.h with 86% similarity]
Source/WebCore/html/canvas/WebMetalTextureDescriptor.idl [moved from Source/WebCore/html/canvas/WebGPUTextureDescriptor.idl with 94% similarity]
Source/WebCore/inspector/InspectorCanvas.cpp
Source/WebCore/inspector/agents/InspectorCanvasAgent.cpp
Source/WebCore/page/RuntimeEnabledFeatures.h
Source/WebCore/platform/Logging.h
Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm
Source/WebCore/platform/graphics/cocoa/WebMetalLayer.h [moved from Source/WebCore/platform/graphics/cocoa/WebGPULayer.h with 91% similarity]
Source/WebCore/platform/graphics/cocoa/WebMetalLayer.mm [moved from Source/WebCore/platform/graphics/cocoa/WebGPULayer.mm with 94% similarity]
Source/WebCore/platform/graphics/gpu/GPUBuffer.cpp
Source/WebCore/platform/graphics/gpu/GPUBuffer.h
Source/WebCore/platform/graphics/gpu/GPUCommandBuffer.cpp
Source/WebCore/platform/graphics/gpu/GPUCommandBuffer.h
Source/WebCore/platform/graphics/gpu/GPUCommandQueue.cpp
Source/WebCore/platform/graphics/gpu/GPUCommandQueue.h
Source/WebCore/platform/graphics/gpu/GPUComputeCommandEncoder.cpp
Source/WebCore/platform/graphics/gpu/GPUComputeCommandEncoder.h
Source/WebCore/platform/graphics/gpu/GPUComputePipelineState.cpp
Source/WebCore/platform/graphics/gpu/GPUComputePipelineState.h
Source/WebCore/platform/graphics/gpu/GPUDepthStencilDescriptor.cpp
Source/WebCore/platform/graphics/gpu/GPUDepthStencilDescriptor.h
Source/WebCore/platform/graphics/gpu/GPUDepthStencilState.cpp
Source/WebCore/platform/graphics/gpu/GPUDepthStencilState.h
Source/WebCore/platform/graphics/gpu/GPUDevice.cpp
Source/WebCore/platform/graphics/gpu/GPUDevice.h
Source/WebCore/platform/graphics/gpu/GPUDrawable.cpp
Source/WebCore/platform/graphics/gpu/GPUDrawable.h
Source/WebCore/platform/graphics/gpu/GPUEnums.h
Source/WebCore/platform/graphics/gpu/GPUFunction.cpp
Source/WebCore/platform/graphics/gpu/GPUFunction.h
Source/WebCore/platform/graphics/gpu/GPULibrary.cpp
Source/WebCore/platform/graphics/gpu/GPULibrary.h
Source/WebCore/platform/graphics/gpu/GPURenderCommandEncoder.cpp
Source/WebCore/platform/graphics/gpu/GPURenderCommandEncoder.h
Source/WebCore/platform/graphics/gpu/GPURenderPassAttachmentDescriptor.cpp
Source/WebCore/platform/graphics/gpu/GPURenderPassAttachmentDescriptor.h
Source/WebCore/platform/graphics/gpu/GPURenderPassColorAttachmentDescriptor.cpp
Source/WebCore/platform/graphics/gpu/GPURenderPassColorAttachmentDescriptor.h
Source/WebCore/platform/graphics/gpu/GPURenderPassDepthAttachmentDescriptor.cpp
Source/WebCore/platform/graphics/gpu/GPURenderPassDepthAttachmentDescriptor.h
Source/WebCore/platform/graphics/gpu/GPURenderPassDescriptor.cpp
Source/WebCore/platform/graphics/gpu/GPURenderPassDescriptor.h
Source/WebCore/platform/graphics/gpu/GPURenderPipelineColorAttachmentDescriptor.cpp
Source/WebCore/platform/graphics/gpu/GPURenderPipelineColorAttachmentDescriptor.h
Source/WebCore/platform/graphics/gpu/GPURenderPipelineDescriptor.cpp
Source/WebCore/platform/graphics/gpu/GPURenderPipelineDescriptor.h
Source/WebCore/platform/graphics/gpu/GPURenderPipelineState.cpp
Source/WebCore/platform/graphics/gpu/GPURenderPipelineState.h
Source/WebCore/platform/graphics/gpu/GPUSize.h
Source/WebCore/platform/graphics/gpu/GPUTexture.cpp
Source/WebCore/platform/graphics/gpu/GPUTexture.h
Source/WebCore/platform/graphics/gpu/GPUTextureDescriptor.cpp
Source/WebCore/platform/graphics/gpu/GPUTextureDescriptor.h
Source/WebCore/platform/graphics/metal/GPUBufferMetal.mm
Source/WebCore/platform/graphics/metal/GPUCommandBufferMetal.mm
Source/WebCore/platform/graphics/metal/GPUCommandQueueMetal.mm
Source/WebCore/platform/graphics/metal/GPUComputeCommandEncoderMetal.mm
Source/WebCore/platform/graphics/metal/GPUComputePipelineStateMetal.mm
Source/WebCore/platform/graphics/metal/GPUDepthStencilDescriptorMetal.mm
Source/WebCore/platform/graphics/metal/GPUDepthStencilStateMetal.mm
Source/WebCore/platform/graphics/metal/GPUDeviceMetal.mm
Source/WebCore/platform/graphics/metal/GPUDrawableMetal.mm
Source/WebCore/platform/graphics/metal/GPUFunctionMetal.mm
Source/WebCore/platform/graphics/metal/GPULibraryMetal.mm
Source/WebCore/platform/graphics/metal/GPURenderCommandEncoderMetal.mm
Source/WebCore/platform/graphics/metal/GPURenderPassAttachmentDescriptorMetal.mm
Source/WebCore/platform/graphics/metal/GPURenderPassColorAttachmentDescriptorMetal.mm
Source/WebCore/platform/graphics/metal/GPURenderPassDepthAttachmentDescriptorMetal.mm
Source/WebCore/platform/graphics/metal/GPURenderPassDescriptorMetal.mm
Source/WebCore/platform/graphics/metal/GPURenderPipelineColorAttachmentDescriptorMetal.mm
Source/WebCore/platform/graphics/metal/GPURenderPipelineDescriptorMetal.mm
Source/WebCore/platform/graphics/metal/GPURenderPipelineStateMetal.mm
Source/WebCore/platform/graphics/metal/GPUTextureDescriptorMetal.mm
Source/WebCore/platform/graphics/metal/GPUTextureMetal.mm
Source/WebCore/testing/InternalSettings.cpp
Source/WebCore/testing/InternalSettings.h
Source/WebCore/testing/InternalSettings.idl
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Models/Canvas.js
Source/WebKit/ChangeLog
Source/WebKit/Configurations/FeatureDefines.xcconfig
Source/WebKit/Shared/WebPreferences.yaml
Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.cpp
Source/WebKitLegacy/mac/ChangeLog
Source/WebKitLegacy/mac/Configurations/FeatureDefines.xcconfig
Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h
Source/WebKitLegacy/mac/WebView/WebPreferences.mm
Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h
Source/WebKitLegacy/mac/WebView/WebView.mm
Source/cmake/WebKitFeatures.cmake
Tools/ChangeLog
Tools/DumpRenderTree/mac/DumpRenderTree.mm
Tools/TestWebKitAPI/Configurations/FeatureDefines.xcconfig
Tools/TestWebKitAPI/Tests/WebCore/mac/GPUBuffer.mm
Tools/TestWebKitAPI/Tests/WebCore/mac/GPUCommandQueue.mm
Tools/TestWebKitAPI/Tests/WebCore/mac/GPUDevice.mm
Tools/TestWebKitAPI/Tests/WebCore/mac/GPUFunction.mm
Tools/TestWebKitAPI/Tests/WebCore/mac/GPULibrary.mm
Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp
Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp
Tools/WebKitTestRunner/InjectedBundle/TestRunner.h
Websites/webkit.org/ChangeLog
Websites/webkit.org/demos/webgpu/shared.js [deleted file]
Websites/webkit.org/demos/webmetal/2d.html [moved from Websites/webkit.org/demos/webgpu/2d.html with 92% similarity]
Websites/webkit.org/demos/webmetal/2d.jpg [moved from Websites/webkit.org/demos/webgpu/2d.jpg with 100% similarity]
Websites/webkit.org/demos/webmetal/2d.js [moved from Websites/webkit.org/demos/webgpu/2d.js with 95% similarity]
Websites/webkit.org/demos/webmetal/circle.svg [moved from Websites/webkit.org/demos/webgpu/circle.svg with 100% similarity]
Websites/webkit.org/demos/webmetal/cubes.html [moved from Websites/webkit.org/demos/webgpu/cubes.html with 93% similarity]
Websites/webkit.org/demos/webmetal/cubes.jpg [moved from Websites/webkit.org/demos/webgpu/cubes.jpg with 100% similarity]
Websites/webkit.org/demos/webmetal/cubes.js [moved from Websites/webkit.org/demos/webgpu/cubes.js with 96% similarity]
Websites/webkit.org/demos/webmetal/gl-matrix-min.js [moved from Websites/webkit.org/demos/webgpu/gl-matrix-min.js with 100% similarity]
Websites/webkit.org/demos/webmetal/hello.html [moved from Websites/webkit.org/demos/webgpu/hello.html with 89% similarity]
Websites/webkit.org/demos/webmetal/hello.jpg [moved from Websites/webkit.org/demos/webgpu/hello.jpg with 100% similarity]
Websites/webkit.org/demos/webmetal/hello.js [moved from Websites/webkit.org/demos/webgpu/hello.js with 91% similarity]
Websites/webkit.org/demos/webmetal/index.html [moved from Websites/webkit.org/demos/webgpu/index.html with 94% similarity]
Websites/webkit.org/demos/webmetal/shared.css [moved from Websites/webkit.org/demos/webgpu/shared.css with 100% similarity]
Websites/webkit.org/demos/webmetal/shared.js [new file with mode: 0644]
Websites/webkit.org/demos/webmetal/simple.html [moved from Websites/webkit.org/demos/webgpu/simple.html with 90% similarity]
Websites/webkit.org/demos/webmetal/simple.jpg [moved from Websites/webkit.org/demos/webgpu/simple.jpg with 100% similarity]
Websites/webkit.org/demos/webmetal/simple.js [moved from Websites/webkit.org/demos/webgpu/simple.js with 93% similarity]
Websites/webkit.org/experimental-features.html

index b409b85..2410264 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2018-10-08  Justin Fan  <justin_fan@apple.com>
+
+        WebGPU: Rename old WebGPU prototype to WebMetal
+        https://bugs.webkit.org/show_bug.cgi?id=190325
+
+        Reviewed by Dean Jackson.
+
+        * Source/cmake/WebKitFeatures.cmake:
+
 2018-10-02  Philippe Normand  <pnormand@igalia.com>
 
         [GStreamer][MSE] Ubuntu LTS build broken since r236409
index b2d4844..858aa49 100644 (file)
@@ -1,3 +1,28 @@
+2018-10-08  Justin Fan  <justin_fan@apple.com>
+
+        WebGPU: Rename old WebGPU prototype to WebMetal
+        https://bugs.webkit.org/show_bug.cgi?id=190325
+        <rdar://problem/44990443>
+
+        Reviewed by Dean Jackson.
+
+        Rename WebGPU prototype files to WebMetal in preparation for implementing the new (Oct 2018) WebGPU interface.
+
+        * fast/canvas/webgpu/webgpu-runtime-flag-expected.txt: Removed.
+        * fast/canvas/webmetal/webmetal-dispatch-expected.txt: Renamed from LayoutTests/fast/canvas/webgpu/webgpu-dispatch-expected.txt.
+        * fast/canvas/webmetal/webmetal-dispatch.html: Renamed from LayoutTests/fast/canvas/webgpu/webgpu-dispatch.html.
+        * fast/canvas/webmetal/webmetal-runtime-flag-expected.txt: Added.
+        * fast/canvas/webmetal/webmetal-runtime-flag.html: Renamed from LayoutTests/fast/canvas/webgpu/webgpu-runtime-flag.html.
+        * inspector/canvas/create-context-webmetal-expected.txt: Renamed from LayoutTests/inspector/canvas/create-context-webgpu-expected.txt.
+        * inspector/canvas/create-context-webmetal.html: Renamed from LayoutTests/inspector/canvas/create-context-webgpu.html.
+        * inspector/canvas/resolveCanvasContext-webgpu-expected.txt: Removed.
+        * inspector/canvas/resolveCanvasContext-webmetal-expected.txt: Added.
+        * inspector/canvas/resolveCanvasContext-webmetal.html: Renamed from LayoutTests/inspector/canvas/resolveCanvasContext-webgpu.html.
+        * platform/gtk/TestExpectations:
+        * platform/ios/TestExpectations:
+        * platform/mac/TestExpectations:
+        * platform/win/TestExpectations:
+
 2018-10-08  Devin Rousso  <drousso@apple.com>
 
         Web Inspector: allow multiple canvases to be recorded at the same time
diff --git a/LayoutTests/fast/canvas/webgpu/webgpu-runtime-flag-expected.txt b/LayoutTests/fast/canvas/webgpu/webgpu-runtime-flag-expected.txt
deleted file mode 100644 (file)
index acf883e..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-PASS: WebGPU was available when enabled.
-PASS: WebGPU was not available when disabled.
@@ -38,8 +38,8 @@ function run() {
         return;
     }
 
-    window.internals.settings.setWebGPUEnabled(true);
-    let gpu = document.createElement("canvas").getContext("webgpu");
+    window.internals.settings.setWebMetalEnabled(true);
+    let gpu = document.createElement("canvas").getContext("webmetal");
     let commandQueue = gpu.createCommandQueue();
 
     let library = gpu.createLibrary(document.getElementById("script").text);
diff --git a/LayoutTests/fast/canvas/webmetal/webmetal-runtime-flag-expected.txt b/LayoutTests/fast/canvas/webmetal/webmetal-runtime-flag-expected.txt
new file mode 100644 (file)
index 0000000..df3901a
--- /dev/null
@@ -0,0 +1,2 @@
+PASS: WebMetal was available when enabled.
+PASS: WebMetal was not available when disabled.
@@ -18,21 +18,21 @@ function run() {
         return;
     }
 
-    window.internals.settings.setWebGPUEnabled(true);
-    var ctx = getContext("webgpu");
+    window.internals.settings.setWebMetalEnabled(true);
+    var ctx = getContext("webmetal");
     if (ctx)
-        output.textContent = "PASS: WebGPU was available when enabled.";
+        output.textContent = "PASS: WebMetal was available when enabled.";
     else
-        output.textContent = "FAIL: WebGPU was not available when enabled.";
+        output.textContent = "FAIL: WebMetal was not available when enabled.";
 
     output = document.getElementById("output2");
 
-    window.internals.settings.setWebGPUEnabled(false);
-    var ctx = getContext("webgpu");
+    window.internals.settings.setWebMetalEnabled(false);
+    var ctx = getContext("webmetal");
     if (ctx)
-        output.textContent = "FAIL: WebGPU was available when disabled.";
+        output.textContent = "FAIL: WebMetal was available when disabled.";
     else
-        output.textContent = "PASS: WebGPU was not available when disabled.";
+        output.textContent = "PASS: WebMetal was not available when disabled.";
 }
 
 window.addEventListener("load", run, false);
@@ -1,12 +1,12 @@
-Test that CanvasManager tracks creation and destruction of WebGPU canvases.
+Test that CanvasManager tracks creation and destruction of WebMetal canvases.
 
 
-== Running test suite: Canvas.CreateContextWebGPU
--- Running test case: Canvas.CreateContextWebGPU.NoCanvases
+== Running test suite: Canvas.CreateContextWebMetal
+-- Running test case: Canvas.CreateContextWebMetal.NoCanvases
 PASS: CanvasManager should have no canvases.
 
--- Running test case: Canvas.CreateContextWebGPU.Attached
-PASS: Canvas context should be WebGPU.
+-- Running test case: Canvas.CreateContextWebMetal.Attached
+PASS: Canvas context should be WebMetal.
   0: getContext - [native code]
   1: createAttachedCanvas - inspector/canvas/resources/create-context-utilities.js:4:36
   2: Global Code - [program code]
@@ -16,8 +16,8 @@ PASS: Canvas context should be WebGPU.
 
 PASS: Removed canvas has expected ID.
 
--- Running test case: Canvas.CreateContextWebGPU.Detached
-PASS: Canvas context should be WebGPU.
+-- Running test case: Canvas.CreateContextWebMetal.Detached
+PASS: Canvas context should be WebMetal.
   0: getContext - [native code]
   1: createDetachedCanvas - inspector/canvas/resources/create-context-utilities.js:8:62
   2: Global Code - [program code]
@@ -27,9 +27,9 @@ PASS: Canvas context should be WebGPU.
 
 PASS: Removed canvas has expected ID.
 
--- Running test case: Canvas.CreateContextWebGPU.CSSCanvas
+-- Running test case: Canvas.CreateContextWebMetal.CSSCanvas
 Create CSS canvas from -webkit-canvas(css-canvas).
-PASS: Canvas context should be WebGPU.
+PASS: Canvas context should be WebMetal.
   0: getCSSCanvasContext - [native code]
   1: createCSSCanvas - inspector/canvas/resources/create-context-utilities.js:12:47
   2: Global Code - [program code]
@@ -6,30 +6,30 @@
 <script src="resources/create-context-utilities.js"></script>
 <script>
 if (window.internals)
-    window.internals.settings.setWebGPUEnabled(true);
+    window.internals.settings.setWebMetalEnabled(true);
 
 function test() {
-    let suite = initializeTestSuite("Canvas.CreateContextWebGPU");
+    let suite = initializeTestSuite("Canvas.CreateContextWebMetal");
 
     addSimpleTestCase({
         name: "Attached",
-        expression: `createAttachedCanvas("webgpu")`,
-        contextType: WI.Canvas.ContextType.WebGPU,
+        expression: `createAttachedCanvas("webmetal")`,
+        contextType: WI.Canvas.ContextType.WebMetal,
     });
 
     addSimpleTestCase({
         name: "Detached",
-        expression: `createDetachedCanvas("webgpu")`,
-        contextType: WI.Canvas.ContextType.WebGPU,
+        expression: `createDetachedCanvas("webmetal")`,
+        contextType: WI.Canvas.ContextType.WebMetal,
     });
 
-    addCSSCanvasTestCase(WI.Canvas.ContextType.WebGPU);
+    addCSSCanvasTestCase(WI.Canvas.ContextType.WebMetal;
 
     suite.runTestCasesAndFinish();
 }
 </script>
 </head>
 <body onload="runTest()">
-    <p>Test that CanvasManager tracks creation and destruction of WebGPU canvases.</p>
+    <p>Test that CanvasManager tracks creation and destruction of WebMetal canvases.</p>
 </body>
 </html>
diff --git a/LayoutTests/inspector/canvas/resolveCanvasContext-webgpu-expected.txt b/LayoutTests/inspector/canvas/resolveCanvasContext-webgpu-expected.txt
deleted file mode 100644 (file)
index dd4b3e3..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-Tests for the Canvas.resolveCanvasContext command for WebGPU contexts.
-
-
-== Running test suite: Canvas.resolveCanvasContextWebGPU
--- Running test case: Canvas.resolveCanvasContextWebGPU.validIdentifier
-PASS: Payload should have type "object".
-PASS: Payload should have className "WebGPURenderingContext".
-
diff --git a/LayoutTests/inspector/canvas/resolveCanvasContext-webmetal-expected.txt b/LayoutTests/inspector/canvas/resolveCanvasContext-webmetal-expected.txt
new file mode 100644 (file)
index 0000000..bebf2d7
--- /dev/null
@@ -0,0 +1,8 @@
+Tests for the Canvas.resolveCanvasContext command for WebMetal contexts.
+
+
+== Running test suite: Canvas.resolveCanvasContextWebMetal
+-- Running test case: Canvas.resolveCanvasContextWebMetal.validIdentifier
+PASS: Payload should have type "object".
+PASS: Payload should have className "WebMetalRenderingContext".
+
@@ -4,23 +4,23 @@
 <script src="../../http/tests/inspector/resources/inspector-test.js"></script>
 <script>
 if (window.internals)
-    window.internals.settings.setWebGPUEnabled(true);
+    window.internals.settings.setWebMetalEnabled(true);
 
 function load() {
-    window.contextWebGPU = document.body.appendChild(document.createElement("canvas")).getContext("webgpu");
+    window.contextWebMetal = document.body.appendChild(document.createElement("canvas")).getContext("webmetal");
 
     runTest();
 }
 
 function test()
 {
-    let suite = InspectorTest.createAsyncSuite("Canvas.resolveCanvasContextWebGPU");
+    let suite = InspectorTest.createAsyncSuite("Canvas.resolveCanvasContextWebMetal");
 
     suite.addTestCase({
-        name: `Canvas.resolveCanvasContextWebGPU.validIdentifier`,
+        name: `Canvas.resolveCanvasContextWebMetal.validIdentifier`,
         description: "Should return a valid object for the given canvas identifier.",
         test(resolve, reject) {
-            let canvas = WI.canvasManager.canvases.find((canvas) => canvas.contextType === WI.Canvas.ContextType.WebGPU);
+            let canvas = WI.canvasManager.canvases.find((canvas) => canvas.contextType === WI.Canvas.ContextType.WebMetal);
             if (!canvas) {
                 reject(`Missing Canvas.`);
                 return;
@@ -30,7 +30,7 @@ function test()
             CanvasAgent.resolveCanvasContext(canvas.identifier, objectGroup)
             .then(({object}) => {
                 InspectorTest.expectEqual(object.type, "object", `Payload should have type "object".`);
-                InspectorTest.expectEqual(object.className, "WebGPURenderingContext", `Payload should have className "WebGPURenderingContext".`);
+                InspectorTest.expectEqual(object.className, "WebMetalRenderingContext", `Payload should have className "WebMetalRenderingContext".`);
             })
             .then(resolve, reject);
         }
@@ -41,6 +41,6 @@ function test()
 </script>
 </head>
 <body onload="load()">
-    <p>Tests for the Canvas.resolveCanvasContext command for WebGPU contexts.</p>
+    <p>Tests for the Canvas.resolveCanvasContext command for WebMetal contexts.</p>
 </body>
 </html>
index 50b5523..426a1f3 100644 (file)
@@ -1114,10 +1114,10 @@ plugins/form-value.html [ Skip ]
 fast/files/filereader-zip-bundle-using-open-panel.html [ Skip ]
 http/tests/local/fileapi/upload-zip-bundle-as-blob-using-open-panel.html [ Skip ]
 
-# WebGPU is not enabled on GTK+.
-fast/canvas/webgpu [ Skip ]
-inspector/canvas/create-context-webgpu.html [ Skip ]
-inspector/canvas/resolveCanvasContext-webgpu.html [ Skip ]
+# WebMetal is not enabled on GTK+.
+fast/canvas/webmetal [ Skip ]
+inspector/canvas/create-context-webmetal.html [ Skip ]
+inspector/canvas/resolveCanvasContext-webmetal.html [ Skip ]
 
 # We don't support APPLE_PAY.
 http/tests/ssl/applepay [ Skip ]
index 57321e6..eecf511 100644 (file)
@@ -36,9 +36,9 @@ http/tests/fullscreen
 compositing/no-compositing-when-fulll-screen-is-present.html
 
 # WebGPU is not enabled on iOS Simulator.
-fast/canvas/webgpu
-inspector/canvas/create-context-webgpu.html [ Skip ]
-inspector/canvas/resolveCanvasContext-webgpu.html [ Skip ]
+fast/canvas/webmetal
+inspector/canvas/create-context-webmetal.html [ Skip ]
+inspector/canvas/resolveCanvasContext-webmetal.html [ Skip ]
 
 # Encrypted Media Extensions are not enabled
 media/encrypted-media/
index ef502fc..79cc17a 100644 (file)
@@ -1042,7 +1042,7 @@ webkit.org/b/150978 fast/canvas/webgl/oes-texture-half-float-linear.html [ Pass
 webkit.org/b/173931 inspector/canvas/context-attributes.html [ Pass Timeout ]
 webkit.org/b/178028 inspector/canvas/create-context-2d.html [ Pass Timeout ]
 webkit.org/b/174066 inspector/canvas/create-context-webgl2.html [ Pass Timeout ]
-webkit.org/b/174066 inspector/canvas/create-context-webgpu.html [ Pass Timeout ]
+webkit.org/b/174066 inspector/canvas/create-context-webmetal.html [ Pass Timeout ]
 webkit.org/b/174272 inspector/canvas/css-canvas-clients.html [ Pass Timeout ]
 webkit.org/b/174066 inspector/canvas/shaderProgram-add-remove-webgl2.html [ Pass Failure Timeout ]
 webkit.org/b/160048 [ Debug ] inspector/codemirror/prettyprinting-javascript.html [ Pass Timeout ]
index 7fb95d6..763e073 100644 (file)
@@ -2441,8 +2441,8 @@ inspector/memory [ Skip ]
 # inspector/debugger/removeBreakpoint.html [ Skip ] # Crashing
 # inspector/debugger/searchInContent-linebreaks.html [ Pass Crash ] # Flaky
 
-inspector/canvas/create-context-webgpu.html [ Skip ]
-inspector/canvas/resolveCanvasContext-webgpu.html [ Skip ]
+inspector/canvas/create-context-webmetal.html [ Skip ]
+inspector/canvas/resolveCanvasContext-webmetal.html [ Skip ]
 
 ################################################################################
 #################        End Inspector Issues               ####################
@@ -3527,7 +3527,7 @@ fast/animation/request-animation-frame-throttling-lowPowerMode.html [ Failure ]
 fast/block/positioning/016.html [ Failure ]
 fast/block/positioning/025.html [ Failure ]
 fast/block/positioning/fixed-position-stacking-context.html [ Failure ]
-fast/canvas/webgpu/webgpu-runtime-flag.html [ Failure ]
+fast/canvas/webmetal/webmetal-runtime-flag.html [ Failure ]
 fast/css/getComputedStyle/computed-style-font-family.html [ Failure ]
 fast/css/getComputedStyle/computed-style-without-renderer.html [ Failure ]
 fast/css/getComputedStyle/computed-style.html [ Failure ]
@@ -3642,7 +3642,7 @@ legacy-animation-engine/animations/font-variations/font-style.html [ Skip ]
 editing/selection/caret-after-tap-in-editable-selection.html [ Skip ]
 editing/selection/character-granularity-select-text-with-click-handler.html [ Skip ]
 editing/selection/character-granularity-selected-range-after-dismissing-selection.html [ Skip ]
-fast/canvas/webgpu/webgpu-dispatch.html [ Skip ]
+fast/canvas/webmetal/webmetal-dispatch.html [ Skip ]
 fast/dom/FileList-iterator-using-open-panel.html [ Skip ]
 fast/forms/file/file-input-reset-using-open-panel.html [ Skip ]
 fast/forms/file/file-reset-in-change-using-open-panel.html [ Skip ]
index dec7bc6..f9e4013 100644 (file)
@@ -1,3 +1,17 @@
+2018-10-08  Justin Fan  <justin_fan@apple.com>
+
+        WebGPU: Rename old WebGPU prototype to WebMetal
+        https://bugs.webkit.org/show_bug.cgi?id=190325
+        <rdar://problem/44990443>
+
+        Reviewed by Dean Jackson.
+
+        Rename WebGPU prototype files to WebMetal in preparation for implementing the new (Oct 2018) WebGPU interface.
+
+        * Configurations/FeatureDefines.xcconfig:
+        * inspector/protocol/Canvas.json:
+        * inspector/scripts/codegen/generator.py:
+
 2018-10-08  Aditya Keerthi  <akeerthi@apple.com>
 
         Make <input type=color> a runtime enabled (on-by-default) feature
index e848483..689ed00 100644 (file)
@@ -350,11 +350,11 @@ ENABLE_WEBGL = ENABLE_WEBGL;
 
 ENABLE_WEBGL2 = ENABLE_WEBGL2;
 
-ENABLE_WEBGPU = $(ENABLE_WEBGPU_$(WK_PLATFORM_NAME));
-ENABLE_WEBGPU_iphoneos = ENABLE_WEBGPU;
-ENABLE_WEBGPU_watchos = ENABLE_WEBGPU;
-ENABLE_WEBGPU_appletvos = ENABLE_WEBGPU;
-ENABLE_WEBGPU_macosx = ENABLE_WEBGPU;
+ENABLE_WEBMETAL = $(ENABLE_WEBMETAL_$(WK_PLATFORM_NAME));
+ENABLE_WEBMETAL_iphoneos = ENABLE_WEBMETAL;
+ENABLE_WEBMETAL_watchos = ENABLE_WEBMETAL;
+ENABLE_WEBMETAL_appletvos = ENABLE_WEBMETAL;
+ENABLE_WEBMETAL_macosx = ENABLE_WEBMETAL;
 
 ENABLE_WEB_AUDIO = ENABLE_WEB_AUDIO;
 
@@ -372,4 +372,4 @@ ENABLE_WIRELESS_PLAYBACK_TARGET = ENABLE_WIRELESS_PLAYBACK_TARGET;
 
 ENABLE_XSLT = ENABLE_XSLT;
 
-FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_APPLE_PAY_SESSION_V4) $(ENABLE_APPLICATION_MANIFEST) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_EXPERIMENTAL_FEATURES) $(ENABLE_FAST_JIT_PERMISSIONS) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FTL_JIT) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_JIT) $(ENABLE_JS_ASYNC_ITERATION) $(ENABLE_KEYBOARD_CODE_ATTRIBUTE) $(ENABLE_KEYBOARD_KEY_ATTRIBUTE) $(ENABLE_LAYOUT_FORMATTING_CONTEXT) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LETTERPRESS) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MAC_VIDEO_TOOLBOX) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAYMENT_REQUEST) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_LOCK) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SERVICE_WORKER) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_USER_MESSAGE_HANDLERS) $(ENABLE_USERSELECT_ALL) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_AUTHN) $(ENABLE_WEB_RTC) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBASSEMBLY_STREAMING_API) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEBGPU) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT);
+FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_APPLE_PAY_SESSION_V4) $(ENABLE_APPLICATION_MANIFEST) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_EXPERIMENTAL_FEATURES) $(ENABLE_FAST_JIT_PERMISSIONS) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FTL_JIT) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_JIT) $(ENABLE_JS_ASYNC_ITERATION) $(ENABLE_KEYBOARD_CODE_ATTRIBUTE) $(ENABLE_KEYBOARD_KEY_ATTRIBUTE) $(ENABLE_LAYOUT_FORMATTING_CONTEXT) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LETTERPRESS) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MAC_VIDEO_TOOLBOX) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAYMENT_REQUEST) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_LOCK) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SERVICE_WORKER) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_USER_MESSAGE_HANDLERS) $(ENABLE_USERSELECT_ALL) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_AUTHN) $(ENABLE_WEB_RTC) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBASSEMBLY_STREAMING_API) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEBMETAL) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT);
index 8f78d93..2023270 100644 (file)
@@ -16,7 +16,7 @@
         {
             "id": "ContextType",
             "type": "string",
-            "enum": ["canvas-2d", "bitmaprenderer", "webgl", "webgl2", "webgpu"],
+            "enum": ["canvas-2d", "bitmaprenderer", "webgl", "webgl2", "webmetal"],
             "description": "The type of rendering context backing the canvas element."
         },
         {
index 1c9892d..38a5979 100755 (executable)
@@ -50,7 +50,7 @@ _ENUM_IDENTIFIER_RENAME_MAP = {
     'canvas-webgl': 'CanvasWebGL',  # Recording.Type.canvas-webgl
     'webgl': 'WebGL',  # Canvas.ContextType.webgl
     'webgl2': 'WebGL2',  # Canvas.ContextType.webgl2
-    'webgpu': 'WebGPU',  # Canvas.ContextType.webgpu
+    'webmetal': 'WebMetal',  # Canvas.ContextType.webmetal
     'bitmaprenderer': 'BitmapRenderer',  # Canvas.ContextType.bitmaprenderer
     'webrtc': 'WebRTC',  # Console.ChannelSource.webrtc
 }
index 9cd99af..bc5433c 100644 (file)
@@ -790,28 +790,28 @@ set(WebCore_NON_SVG_IDL_FILES
     html/canvas/ImageSmoothingQuality.idl
     html/canvas/OffscreenCanvasRenderingContext2D.idl
     html/canvas/Path2D.idl
-    html/canvas/WebGPUBuffer.idl
-    html/canvas/WebGPUCommandBuffer.idl
-    html/canvas/WebGPUCommandQueue.idl
-    html/canvas/WebGPUComputeCommandEncoder.idl
-    html/canvas/WebGPUComputePipelineState.idl
-    html/canvas/WebGPUDepthStencilDescriptor.idl
-    html/canvas/WebGPUDepthStencilState.idl
-    html/canvas/WebGPUDrawable.idl
-    html/canvas/WebGPUFunction.idl
-    html/canvas/WebGPULibrary.idl
-    html/canvas/WebGPURenderCommandEncoder.idl
-    html/canvas/WebGPURenderPassAttachmentDescriptor.idl
-    html/canvas/WebGPURenderPassColorAttachmentDescriptor.idl
-    html/canvas/WebGPURenderPassDepthAttachmentDescriptor.idl
-    html/canvas/WebGPURenderPassDescriptor.idl
-    html/canvas/WebGPURenderPipelineColorAttachmentDescriptor.idl
-    html/canvas/WebGPURenderPipelineDescriptor.idl
-    html/canvas/WebGPURenderPipelineState.idl
-    html/canvas/WebGPURenderingContext.idl
-    html/canvas/WebGPUSize.idl
-    html/canvas/WebGPUTexture.idl
-    html/canvas/WebGPUTextureDescriptor.idl
+    html/canvas/WebMetalBuffer.idl
+    html/canvas/WebMetalCommandBuffer.idl
+    html/canvas/WebMetalCommandQueue.idl
+    html/canvas/WebMetalComputeCommandEncoder.idl
+    html/canvas/WebMetalComputePipelineState.idl
+    html/canvas/WebMetalDepthStencilDescriptor.idl
+    html/canvas/WebMetalDepthStencilState.idl
+    html/canvas/WebMetalDrawable.idl
+    html/canvas/WebMetalFunction.idl
+    html/canvas/WebMetalLibrary.idl
+    html/canvas/WebMetalRenderCommandEncoder.idl
+    html/canvas/WebMetalRenderPassAttachmentDescriptor.idl
+    html/canvas/WebMetalRenderPassColorAttachmentDescriptor.idl
+    html/canvas/WebMetalRenderPassDepthAttachmentDescriptor.idl
+    html/canvas/WebMetalRenderPassDescriptor.idl
+    html/canvas/WebMetalRenderPipelineColorAttachmentDescriptor.idl
+    html/canvas/WebMetalRenderPipelineDescriptor.idl
+    html/canvas/WebMetalRenderPipelineState.idl
+    html/canvas/WebMetalRenderingContext.idl
+    html/canvas/WebMetalSize.idl
+    html/canvas/WebMetalTexture.idl
+    html/canvas/WebMetalTextureDescriptor.idl
 
     inspector/CommandLineAPIHost.idl
     inspector/InspectorFrontendHost.idl
index 3bfa89c..75d1fa5 100644 (file)
@@ -1,3 +1,358 @@
+2018-10-08  Justin Fan  <justin_fan@apple.com>
+
+        WebGPU: Rename old WebGPU prototype to WebMetal
+        https://bugs.webkit.org/show_bug.cgi?id=190325
+        <rdar://problem/44990443>
+
+        Reviewed by Dean Jackson.
+
+        Existing WebGPU tests also renamed to reflect WebGPU -> WebMetal change.
+
+        Rename WebGPU prototype files to WebMetal in preparation for implementing the new (Oct 2018) WebGPU interface.
+
+        * CMakeLists.txt:
+        * Configurations/FeatureDefines.xcconfig:
+        * DerivedSources.make:
+        * Sources.txt:
+        * SourcesCocoa.txt:
+        * WebCore.xcodeproj/project.pbxproj:
+        * bindings/js/JSWebMetalRenderPassAttachmentDescriptorCustom.cpp: Renamed from Source/WebCore/bindings/js/JSWebGPURenderPassAttachmentDescriptorCustom.cpp.
+        (WebCore::toJSNewlyCreated):
+        (WebCore::toJS):
+        * bindings/js/JSWebMetalRenderingContextCustom.cpp: Renamed from Source/WebCore/bindings/js/JSWebGPURenderingContextCustom.cpp.
+        (WebCore::JSWebMetalRenderingContext::visitAdditionalChildren):
+        * bindings/js/WebCoreBuiltinNames.h:
+        * dom/Document.cpp:
+        (WebCore::Document::getCSSCanvasContext):
+        * dom/Document.h:
+        * dom/Document.idl:
+        * html/HTMLCanvasElement.cpp:
+        (WebCore::HTMLCanvasElement::getContext):
+        (WebCore::HTMLCanvasElement::isWebMetalType):
+        (WebCore::HTMLCanvasElement::createContextWebMetal):
+        (WebCore::HTMLCanvasElement::getContextWebMetal):
+        (WebCore::HTMLCanvasElement::isWebGPUType): Deleted.
+        (WebCore::HTMLCanvasElement::createContextWebGPU): Deleted.
+        (WebCore::HTMLCanvasElement::getContextWebGPU): Deleted.
+        * html/HTMLCanvasElement.h:
+        * html/HTMLCanvasElement.idl:
+        * html/canvas/CanvasRenderingContext.h:
+        (WebCore::CanvasRenderingContext::isWebMetal const):
+        (WebCore::CanvasRenderingContext::isWebGPU const): Deleted.
+        * html/canvas/WebGPURenderingContext.cpp: Removed.
+        * html/canvas/WebMetalBuffer.cpp: Renamed from Source/WebCore/html/canvas/WebGPUBuffer.cpp.
+        (WebCore::WebMetalBuffer::create):
+        (WebCore::WebMetalBuffer::WebMetalBuffer):
+        * html/canvas/WebMetalBuffer.h: Renamed from Source/WebCore/html/canvas/WebGPUBuffer.h.
+        * html/canvas/WebMetalBuffer.idl: Renamed from Source/WebCore/html/canvas/WebGPUBuffer.idl.
+        * html/canvas/WebMetalCommandBuffer.cpp: Renamed from Source/WebCore/html/canvas/WebGPUCommandBuffer.cpp.
+        (WebCore::WebMetalCommandBuffer::create):
+        (WebCore::WebMetalCommandBuffer::WebMetalCommandBuffer):
+        (WebCore::WebMetalCommandBuffer::~WebMetalCommandBuffer):
+        (WebCore::WebMetalCommandBuffer::commit):
+        (WebCore::WebMetalCommandBuffer::presentDrawable):
+        (WebCore::WebMetalCommandBuffer::createRenderCommandEncoderWithDescriptor):
+        (WebCore::WebMetalCommandBuffer::createComputeCommandEncoder):
+        (WebCore::WebMetalCommandBuffer::completed):
+        * html/canvas/WebMetalCommandBuffer.h: Renamed from Source/WebCore/html/canvas/WebGPUCommandBuffer.h.
+        * html/canvas/WebMetalCommandBuffer.idl: Renamed from Source/WebCore/html/canvas/WebGPUCommandBuffer.idl.
+        * html/canvas/WebMetalCommandQueue.cpp: Renamed from Source/WebCore/html/canvas/WebGPUCommandQueue.cpp.
+        (WebCore::WebMetalCommandQueue::create):
+        (WebCore::WebMetalCommandQueue::WebMetalCommandQueue):
+        (WebCore::WebMetalCommandQueue::createCommandBuffer):
+        * html/canvas/WebMetalCommandQueue.h: Renamed from Source/WebCore/html/canvas/WebGPUCommandQueue.h.
+        * html/canvas/WebMetalCommandQueue.idl: Renamed from Source/WebCore/html/canvas/WebGPUCommandQueue.idl.
+        * html/canvas/WebMetalComputeCommandEncoder.cpp: Renamed from Source/WebCore/html/canvas/WebGPUComputeCommandEncoder.cpp.
+        (WebCore::GPUSizeMake):
+        (WebCore::WebMetalComputeCommandEncoder::create):
+        (WebCore::WebMetalComputeCommandEncoder::WebMetalComputeCommandEncoder):
+        (WebCore::WebMetalComputeCommandEncoder::setComputePipelineState):
+        (WebCore::WebMetalComputeCommandEncoder::setBuffer):
+        (WebCore::WebMetalComputeCommandEncoder::dispatch):
+        (WebCore::WebMetalComputeCommandEncoder::endEncoding):
+        * html/canvas/WebMetalComputeCommandEncoder.h: Renamed from Source/WebCore/html/canvas/WebGPUComputeCommandEncoder.h.
+        * html/canvas/WebMetalComputeCommandEncoder.idl: Renamed from Source/WebCore/html/canvas/WebGPUComputeCommandEncoder.idl.
+        * html/canvas/WebMetalComputePipelineState.cpp: Renamed from Source/WebCore/html/canvas/WebGPUComputePipelineState.cpp.
+        (WebCore::WebMetalComputePipelineState::create):
+        (WebCore::WebMetalComputePipelineState::WebMetalComputePipelineState):
+        * html/canvas/WebMetalComputePipelineState.h: Renamed from Source/WebCore/html/canvas/WebGPUComputePipelineState.h.
+        * html/canvas/WebMetalComputePipelineState.idl: Renamed from Source/WebCore/html/canvas/WebGPUComputePipelineState.idl.
+        * html/canvas/WebMetalDepthStencilDescriptor.cpp: Renamed from Source/WebCore/html/canvas/WebGPUDepthStencilDescriptor.cpp.
+        (WebCore::WebMetalDepthStencilDescriptor::create):
+        (WebCore::WebMetalDepthStencilDescriptor::depthWriteEnabled const):
+        (WebCore::WebMetalDepthStencilDescriptor::setDepthWriteEnabled):
+        (WebCore::WebMetalDepthStencilDescriptor::depthCompareFunction const):
+        (WebCore::WebMetalDepthStencilDescriptor::setDepthCompareFunction):
+        * html/canvas/WebMetalDepthStencilDescriptor.h: Renamed from Source/WebCore/html/canvas/WebGPUDepthStencilDescriptor.h.
+        * html/canvas/WebMetalDepthStencilDescriptor.idl: Renamed from Source/WebCore/html/canvas/WebGPUDepthStencilDescriptor.idl.
+        * html/canvas/WebMetalDepthStencilState.cpp: Renamed from Source/WebCore/html/canvas/WebGPUDepthStencilState.cpp.
+        (WebCore::WebMetalDepthStencilState::create):
+        (WebCore::WebMetalDepthStencilState::WebMetalDepthStencilState):
+        (WebCore::WebMetalDepthStencilState::label const):
+        (WebCore::WebMetalDepthStencilState::setLabel):
+        * html/canvas/WebMetalDepthStencilState.h: Renamed from Source/WebCore/html/canvas/WebGPUDepthStencilState.h.
+        * html/canvas/WebMetalDepthStencilState.idl: Renamed from Source/WebCore/html/canvas/WebGPURenderPipelineState.idl.
+        * html/canvas/WebMetalDrawable.cpp: Renamed from Source/WebCore/html/canvas/WebGPUDrawable.cpp.
+        (WebCore::WebMetalDrawable::create):
+        (WebCore::WebMetalDrawable::WebMetalDrawable):
+        * html/canvas/WebMetalDrawable.h: Renamed from Source/WebCore/html/canvas/WebGPUDrawable.h.
+        (WebCore::WebMetalDrawable::texture):
+        * html/canvas/WebMetalDrawable.idl: Renamed from Source/WebCore/html/canvas/WebGPUDrawable.idl.
+        * html/canvas/WebMetalEnums.cpp: Renamed from Source/WebCore/html/canvas/WebGPUEnums.cpp.
+        (WebCore::toWebMetalCompareFunction):
+        (WebCore::web3DCompareFunctionName):
+        (WebCore::toGPUCompareFunction):
+        * html/canvas/WebMetalEnums.h: Renamed from Source/WebCore/html/canvas/WebGPUEnums.h.
+        * html/canvas/WebMetalEnums.idl: Renamed from Source/WebCore/html/canvas/WebGPUEnums.idl.
+        * html/canvas/WebMetalFunction.cpp: Renamed from Source/WebCore/html/canvas/WebGPUFunction.cpp.
+        (WebCore::WebMetalFunction::create):
+        (WebCore::WebMetalFunction::WebMetalFunction):
+        * html/canvas/WebMetalFunction.h: Renamed from Source/WebCore/html/canvas/WebGPUFunction.h.
+        * html/canvas/WebMetalFunction.idl: Renamed from Source/WebCore/html/canvas/WebGPUFunction.idl.
+        * html/canvas/WebMetalLibrary.cpp: Renamed from Source/WebCore/html/canvas/WebGPULibrary.cpp.
+        (WebCore::WebMetalLibrary::create):
+        (WebCore::WebMetalLibrary::WebMetalLibrary):
+        (WebCore::WebMetalLibrary::functionNames const):
+        (WebCore::WebMetalLibrary::functionWithName const):
+        * html/canvas/WebMetalLibrary.h: Renamed from Source/WebCore/html/canvas/WebGPULibrary.h.
+        * html/canvas/WebMetalLibrary.idl: Renamed from Source/WebCore/html/canvas/WebGPULibrary.idl.
+        * html/canvas/WebMetalRenderCommandEncoder.cpp: Renamed from Source/WebCore/html/canvas/WebGPURenderCommandEncoder.cpp.
+        (WebCore::WebMetalRenderCommandEncoder::create):
+        (WebCore::WebMetalRenderCommandEncoder::WebMetalRenderCommandEncoder):
+        (WebCore::WebMetalRenderCommandEncoder::setRenderPipelineState):
+        (WebCore::WebMetalRenderCommandEncoder::setDepthStencilState):
+        (WebCore::WebMetalRenderCommandEncoder::setVertexBuffer):
+        (WebCore::WebMetalRenderCommandEncoder::setFragmentBuffer):
+        (WebCore::WebMetalRenderCommandEncoder::drawPrimitives):
+        (WebCore::WebMetalRenderCommandEncoder::endEncoding):
+        * html/canvas/WebMetalRenderCommandEncoder.h: Renamed from Source/WebCore/html/canvas/WebGPURenderCommandEncoder.h.
+        * html/canvas/WebMetalRenderCommandEncoder.idl: Renamed from Source/WebCore/html/canvas/WebGPURenderCommandEncoder.idl.
+        * html/canvas/WebMetalRenderPassAttachmentDescriptor.cpp: Renamed from Source/WebCore/html/canvas/WebGPURenderPassAttachmentDescriptor.cpp.
+        (WebCore::WebMetalRenderPassAttachmentDescriptor::WebMetalRenderPassAttachmentDescriptor):
+        (WebCore::WebMetalRenderPassAttachmentDescriptor::loadAction const):
+        (WebCore::WebMetalRenderPassAttachmentDescriptor::setLoadAction):
+        (WebCore::WebMetalRenderPassAttachmentDescriptor::storeAction const):
+        (WebCore::WebMetalRenderPassAttachmentDescriptor::setStoreAction):
+        (WebCore::WebMetalRenderPassAttachmentDescriptor::texture const):
+        (WebCore::WebMetalRenderPassAttachmentDescriptor::setTexture):
+        * html/canvas/WebMetalRenderPassAttachmentDescriptor.h: Renamed from Source/WebCore/html/canvas/WebGPURenderPassAttachmentDescriptor.h.
+        * html/canvas/WebMetalRenderPassAttachmentDescriptor.idl: Renamed from Source/WebCore/html/canvas/WebGPURenderPassAttachmentDescriptor.idl.
+        * html/canvas/WebMetalRenderPassColorAttachmentDescriptor.cpp: Renamed from Source/WebCore/html/canvas/WebGPURenderPassColorAttachmentDescriptor.cpp.
+        (WebCore::WebMetalRenderPassColorAttachmentDescriptor::create):
+        (WebCore::WebMetalRenderPassColorAttachmentDescriptor::WebMetalRenderPassColorAttachmentDescriptor):
+        (WebCore::WebMetalRenderPassColorAttachmentDescriptor::descriptor const):
+        (WebCore::WebMetalRenderPassColorAttachmentDescriptor::clearColor const):
+        (WebCore::WebMetalRenderPassColorAttachmentDescriptor::setClearColor):
+        * html/canvas/WebMetalRenderPassColorAttachmentDescriptor.h: Renamed from Source/WebCore/html/canvas/WebGPURenderPassColorAttachmentDescriptor.h.
+        * html/canvas/WebMetalRenderPassColorAttachmentDescriptor.idl: Renamed from Source/WebCore/html/canvas/WebGPURenderPassColorAttachmentDescriptor.idl.
+        * html/canvas/WebMetalRenderPassDepthAttachmentDescriptor.cpp: Renamed from Source/WebCore/html/canvas/WebGPURenderPassDepthAttachmentDescriptor.cpp.
+        (WebCore::WebMetalRenderPassDepthAttachmentDescriptor::create):
+        (WebCore::WebMetalRenderPassDepthAttachmentDescriptor::WebMetalRenderPassDepthAttachmentDescriptor):
+        (WebCore::WebMetalRenderPassDepthAttachmentDescriptor::clearDepth const):
+        (WebCore::WebMetalRenderPassDepthAttachmentDescriptor::setClearDepth):
+        (WebCore::WebMetalRenderPassDepthAttachmentDescriptor::descriptor const):
+        * html/canvas/WebMetalRenderPassDepthAttachmentDescriptor.h: Renamed from Source/WebCore/html/canvas/WebGPURenderPassDepthAttachmentDescriptor.h.
+        * html/canvas/WebMetalRenderPassDepthAttachmentDescriptor.idl: Renamed from Source/WebCore/html/canvas/WebGPURenderPassDepthAttachmentDescriptor.idl.
+        * html/canvas/WebMetalRenderPassDescriptor.cpp: Renamed from Source/WebCore/html/canvas/WebGPURenderPassDescriptor.cpp.
+        (WebCore::WebMetalRenderPassDescriptor::create):
+        (WebCore::WebMetalRenderPassDescriptor::depthAttachment):
+        (WebCore::WebMetalRenderPassDescriptor::colorAttachments):
+        * html/canvas/WebMetalRenderPassDescriptor.h: Renamed from Source/WebCore/html/canvas/WebGPURenderPassDescriptor.h.
+        * html/canvas/WebMetalRenderPassDescriptor.idl: Renamed from Source/WebCore/html/canvas/WebGPURenderPassDescriptor.idl.
+        * html/canvas/WebMetalRenderPipelineColorAttachmentDescriptor.cpp: Renamed from Source/WebCore/html/canvas/WebGPURenderPipelineColorAttachmentDescriptor.cpp.
+        (WebCore::WebMetalRenderPipelineColorAttachmentDescriptor::create):
+        (WebCore::WebMetalRenderPipelineColorAttachmentDescriptor::WebMetalRenderPipelineColorAttachmentDescriptor):
+        (WebCore::WebMetalRenderPipelineColorAttachmentDescriptor::pixelFormat const):
+        (WebCore::WebMetalRenderPipelineColorAttachmentDescriptor::setPixelFormat):
+        * html/canvas/WebMetalRenderPipelineColorAttachmentDescriptor.h: Renamed from Source/WebCore/html/canvas/WebGPURenderPipelineColorAttachmentDescriptor.h.
+        * html/canvas/WebMetalRenderPipelineColorAttachmentDescriptor.idl: Renamed from Source/WebCore/html/canvas/WebGPURenderPipelineColorAttachmentDescriptor.idl.
+        * html/canvas/WebMetalRenderPipelineDescriptor.cpp: Renamed from Source/WebCore/html/canvas/WebGPURenderPipelineDescriptor.cpp.
+        (WebCore::WebMetalRenderPipelineDescriptor::create):
+        (WebCore::WebMetalRenderPipelineDescriptor::vertexFunction const):
+        (WebCore::WebMetalRenderPipelineDescriptor::setVertexFunction):
+        (WebCore::WebMetalRenderPipelineDescriptor::fragmentFunction const):
+        (WebCore::WebMetalRenderPipelineDescriptor::setFragmentFunction):
+        (WebCore::WebMetalRenderPipelineDescriptor::colorAttachments):
+        (WebCore::WebMetalRenderPipelineDescriptor::depthAttachmentPixelFormat const):
+        (WebCore::WebMetalRenderPipelineDescriptor::setDepthAttachmentPixelFormat):
+        (WebCore::WebMetalRenderPipelineDescriptor::reset):
+        * html/canvas/WebMetalRenderPipelineDescriptor.h: Renamed from Source/WebCore/html/canvas/WebGPURenderPipelineDescriptor.h.
+        * html/canvas/WebMetalRenderPipelineDescriptor.idl: Renamed from Source/WebCore/html/canvas/WebGPURenderPipelineDescriptor.idl.
+        * html/canvas/WebMetalRenderPipelineState.cpp: Renamed from Source/WebCore/html/canvas/WebGPURenderPipelineState.cpp.
+        (WebCore::WebMetalRenderPipelineState::create):
+        (WebCore::WebMetalRenderPipelineState::WebMetalRenderPipelineState):
+        (WebCore::WebMetalRenderPipelineState::label const):
+        (WebCore::WebMetalRenderPipelineState::setLabel):
+        * html/canvas/WebMetalRenderPipelineState.h: Renamed from Source/WebCore/html/canvas/WebGPURenderPipelineState.h.
+        * html/canvas/WebMetalRenderPipelineState.idl: Renamed from Source/WebCore/html/canvas/WebGPUDepthStencilState.idl.
+        * html/canvas/WebMetalRenderingContext.cpp: Added.
+        (WebCore::WebMetalRenderingContext::create):
+        (WebCore::WebMetalRenderingContext::WebMetalRenderingContext):
+        (WebCore::WebMetalRenderingContext::canvas const):
+        (WebCore::WebMetalRenderingContext::initializeNewContext):
+        (WebCore::WebMetalRenderingContext::clampedCanvasSize const):
+        (WebCore::WebMetalRenderingContext::hasPendingActivity const):
+        (WebCore::WebMetalRenderingContext::stop):
+        (WebCore::WebMetalRenderingContext::activeDOMObjectName const):
+        (WebCore::WebMetalRenderingContext::canSuspendForDocumentSuspension const):
+        (WebCore::WebMetalRenderingContext::platformLayer const):
+        (WebCore::WebMetalRenderingContext::markLayerComposited):
+        (WebCore::WebMetalRenderingContext::reshape):
+        (WebCore::WebMetalRenderingContext::createLibrary):
+        (WebCore::WebMetalRenderingContext::createRenderPipelineState):
+        (WebCore::WebMetalRenderingContext::createDepthStencilState):
+        (WebCore::WebMetalRenderingContext::createComputePipelineState):
+        (WebCore::WebMetalRenderingContext::createCommandQueue):
+        (WebCore::WebMetalRenderingContext::nextDrawable):
+        (WebCore::WebMetalRenderingContext::createBuffer):
+        (WebCore::WebMetalRenderingContext::createTexture):
+        * html/canvas/WebMetalRenderingContext.h: Renamed from Source/WebCore/html/canvas/WebGPURenderingContext.h.
+        * html/canvas/WebMetalRenderingContext.idl: Renamed from Source/WebCore/html/canvas/WebGPURenderingContext.idl.
+        * html/canvas/WebMetalSize.h: Renamed from Source/WebCore/html/canvas/WebGPUSize.h.
+        * html/canvas/WebMetalSize.idl: Renamed from Source/WebCore/html/canvas/WebGPUSize.idl.
+        * html/canvas/WebMetalTexture.cpp: Renamed from Source/WebCore/html/canvas/WebGPUTexture.cpp.
+        (WebCore::WebMetalTexture::create):
+        (WebCore::WebMetalTexture::WebMetalTexture):
+        * html/canvas/WebMetalTexture.h: Renamed from Source/WebCore/html/canvas/WebGPUTexture.h.
+        * html/canvas/WebMetalTexture.idl: Renamed from Source/WebCore/html/canvas/WebGPUTexture.idl.
+        * html/canvas/WebMetalTextureDescriptor.cpp: Renamed from Source/WebCore/html/canvas/WebGPUTextureDescriptor.cpp.
+        (WebCore::WebMetalTextureDescriptor::create):
+        (WebCore::WebMetalTextureDescriptor::WebMetalTextureDescriptor):
+        (WebCore::WebMetalTextureDescriptor::width const):
+        (WebCore::WebMetalTextureDescriptor::setWidth):
+        (WebCore::WebMetalTextureDescriptor::height const):
+        (WebCore::WebMetalTextureDescriptor::setHeight):
+        (WebCore::WebMetalTextureDescriptor::sampleCount const):
+        (WebCore::WebMetalTextureDescriptor::setSampleCount):
+        (WebCore::WebMetalTextureDescriptor::textureType const):
+        (WebCore::WebMetalTextureDescriptor::setTextureType):
+        (WebCore::WebMetalTextureDescriptor::storageMode const):
+        (WebCore::WebMetalTextureDescriptor::setStorageMode):
+        (WebCore::WebMetalTextureDescriptor::usage const):
+        (WebCore::WebMetalTextureDescriptor::setUsage):
+        * html/canvas/WebMetalTextureDescriptor.h: Renamed from Source/WebCore/html/canvas/WebGPUTextureDescriptor.h.
+        * html/canvas/WebMetalTextureDescriptor.idl: Renamed from Source/WebCore/html/canvas/WebGPUTextureDescriptor.idl.
+        * inspector/InspectorCanvas.cpp:
+        (WebCore::InspectorCanvas::buildObjectForCanvas):
+        * inspector/agents/InspectorCanvasAgent.cpp:
+        (WebCore::InspectorCanvasAgent::requestContent):
+        (WebCore::contextAsScriptValue):
+        * page/RuntimeEnabledFeatures.h:
+        (WebCore::RuntimeEnabledFeatures::setWebMetalEnabled):
+        (WebCore::RuntimeEnabledFeatures::webMetalEnabled const):
+        (WebCore::RuntimeEnabledFeatures::setWebGPUEnabled): Deleted.
+        (WebCore::RuntimeEnabledFeatures::webGPUEnabled const): Deleted.
+        * platform/Logging.h:
+        * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
+        (WebCore::PlatformCALayerCocoa::layerTypeForPlatformLayer):
+        (WebCore::PlatformCALayerCocoa::PlatformCALayerCocoa):
+        * platform/graphics/cocoa/WebMetalLayer.h: Renamed from Source/WebCore/platform/graphics/cocoa/WebGPULayer.h.
+        * platform/graphics/cocoa/WebMetalLayer.mm: Renamed from Source/WebCore/platform/graphics/cocoa/WebGPULayer.mm.
+        (-[WebMetalLayer initWithGPUDevice:]):
+        * platform/graphics/gpu/GPUBuffer.cpp:
+        (WebCore::GPUBuffer::~GPUBuffer):
+        * platform/graphics/gpu/GPUBuffer.h:
+        * platform/graphics/gpu/GPUCommandBuffer.cpp:
+        (WebCore::GPUCommandBuffer::~GPUCommandBuffer):
+        * platform/graphics/gpu/GPUCommandBuffer.h:
+        * platform/graphics/gpu/GPUCommandQueue.cpp:
+        (WebCore::GPUCommandQueue::~GPUCommandQueue):
+        * platform/graphics/gpu/GPUCommandQueue.h:
+        * platform/graphics/gpu/GPUComputeCommandEncoder.cpp:
+        (WebCore::GPUComputeCommandEncoder::~GPUComputeCommandEncoder):
+        * platform/graphics/gpu/GPUComputeCommandEncoder.h:
+        * platform/graphics/gpu/GPUComputePipelineState.cpp:
+        (WebCore::GPUComputePipelineState::~GPUComputePipelineState):
+        * platform/graphics/gpu/GPUComputePipelineState.h:
+        * platform/graphics/gpu/GPUDepthStencilDescriptor.cpp:
+        (WebCore::GPUDepthStencilDescriptor::~GPUDepthStencilDescriptor):
+        * platform/graphics/gpu/GPUDepthStencilDescriptor.h:
+        * platform/graphics/gpu/GPUDepthStencilState.cpp:
+        (WebCore::GPUDepthStencilState::~GPUDepthStencilState):
+        * platform/graphics/gpu/GPUDepthStencilState.h:
+        * platform/graphics/gpu/GPUDevice.cpp:
+        (WebCore::GPUDevice::~GPUDevice):
+        * platform/graphics/gpu/GPUDevice.h:
+        (WebCore::GPUDevice::layer const):
+        * platform/graphics/gpu/GPUDrawable.cpp:
+        (WebCore::GPUDrawable::~GPUDrawable):
+        * platform/graphics/gpu/GPUDrawable.h:
+        * platform/graphics/gpu/GPUEnums.h:
+        * platform/graphics/gpu/GPUFunction.cpp:
+        (WebCore::GPUFunction::~GPUFunction):
+        * platform/graphics/gpu/GPUFunction.h:
+        * platform/graphics/gpu/GPULibrary.cpp:
+        (WebCore::GPULibrary::~GPULibrary):
+        * platform/graphics/gpu/GPULibrary.h:
+        * platform/graphics/gpu/GPURenderCommandEncoder.cpp:
+        (WebCore::GPURenderCommandEncoder::~GPURenderCommandEncoder):
+        * platform/graphics/gpu/GPURenderCommandEncoder.h:
+        * platform/graphics/gpu/GPURenderPassAttachmentDescriptor.cpp:
+        (WebCore::GPURenderPassAttachmentDescriptor::~GPURenderPassAttachmentDescriptor):
+        * platform/graphics/gpu/GPURenderPassAttachmentDescriptor.h:
+        * platform/graphics/gpu/GPURenderPassColorAttachmentDescriptor.cpp:
+        (WebCore::GPURenderPassColorAttachmentDescriptor::~GPURenderPassColorAttachmentDescriptor):
+        * platform/graphics/gpu/GPURenderPassColorAttachmentDescriptor.h:
+        * platform/graphics/gpu/GPURenderPassDepthAttachmentDescriptor.cpp:
+        (WebCore::GPURenderPassDepthAttachmentDescriptor::~GPURenderPassDepthAttachmentDescriptor):
+        * platform/graphics/gpu/GPURenderPassDepthAttachmentDescriptor.h:
+        * platform/graphics/gpu/GPURenderPassDescriptor.cpp:
+        (WebCore::GPURenderPassDescriptor::~GPURenderPassDescriptor):
+        * platform/graphics/gpu/GPURenderPassDescriptor.h:
+        * platform/graphics/gpu/GPURenderPipelineColorAttachmentDescriptor.cpp:
+        (WebCore::GPURenderPipelineColorAttachmentDescriptor::~GPURenderPipelineColorAttachmentDescriptor):
+        * platform/graphics/gpu/GPURenderPipelineColorAttachmentDescriptor.h:
+        * platform/graphics/gpu/GPURenderPipelineDescriptor.cpp:
+        (WebCore::GPURenderPipelineDescriptor::~GPURenderPipelineDescriptor):
+        * platform/graphics/gpu/GPURenderPipelineDescriptor.h:
+        * platform/graphics/gpu/GPURenderPipelineState.cpp:
+        (WebCore::GPURenderPipelineState::~GPURenderPipelineState):
+        * platform/graphics/gpu/GPURenderPipelineState.h:
+        * platform/graphics/gpu/GPUSize.h:
+        * platform/graphics/gpu/GPUTexture.cpp:
+        (WebCore::GPUTexture::~GPUTexture):
+        * platform/graphics/gpu/GPUTexture.h:
+        * platform/graphics/gpu/GPUTextureDescriptor.cpp:
+        (WebCore::GPUTextureDescriptor::~GPUTextureDescriptor):
+        * platform/graphics/gpu/GPUTextureDescriptor.h:
+        * platform/graphics/metal/GPUBufferMetal.mm:
+        (WebCore::GPUBuffer::GPUBuffer):
+        * platform/graphics/metal/GPUCommandBufferMetal.mm:
+        * platform/graphics/metal/GPUCommandQueueMetal.mm:
+        * platform/graphics/metal/GPUComputeCommandEncoderMetal.mm:
+        * platform/graphics/metal/GPUComputePipelineStateMetal.mm:
+        (WebCore::GPUComputePipelineState::GPUComputePipelineState):
+        * platform/graphics/metal/GPUDepthStencilDescriptorMetal.mm:
+        * platform/graphics/metal/GPUDepthStencilStateMetal.mm:
+        (WebCore::GPUDepthStencilState::setLabel const):
+        * platform/graphics/metal/GPUDeviceMetal.mm:
+        (WebCore::GPUDevice::reshape const):
+        * platform/graphics/metal/GPUDrawableMetal.mm:
+        (WebCore::GPUDrawable::release):
+        * platform/graphics/metal/GPUFunctionMetal.mm:
+        * platform/graphics/metal/GPULibraryMetal.mm:
+        (WebCore::GPULibrary::GPULibrary):
+        * platform/graphics/metal/GPURenderCommandEncoderMetal.mm:
+        (WebCore::GPURenderCommandEncoder::GPURenderCommandEncoder):
+        * platform/graphics/metal/GPURenderPassAttachmentDescriptorMetal.mm:
+        * platform/graphics/metal/GPURenderPassColorAttachmentDescriptorMetal.mm:
+        * platform/graphics/metal/GPURenderPassDepthAttachmentDescriptorMetal.mm:
+        * platform/graphics/metal/GPURenderPassDescriptorMetal.mm:
+        * platform/graphics/metal/GPURenderPipelineColorAttachmentDescriptorMetal.mm:
+        * platform/graphics/metal/GPURenderPipelineDescriptorMetal.mm:
+        * platform/graphics/metal/GPURenderPipelineStateMetal.mm:
+        (WebCore::GPURenderPipelineState::setLabel const):
+        * platform/graphics/metal/GPUTextureDescriptorMetal.mm:
+        * platform/graphics/metal/GPUTextureMetal.mm:
+        (WebCore::GPUTexture::GPUTexture):
+        * testing/InternalSettings.cpp:
+        (WebCore::InternalSettings::Backup::Backup):
+        (WebCore::InternalSettings::Backup::restoreTo):
+        (WebCore::InternalSettings::setWebMetalEnabled):
+        (WebCore::InternalSettings::setWebGPUEnabled): Deleted.
+        * testing/InternalSettings.h:
+        * testing/InternalSettings.idl:
+
 2018-10-08  Dean Jackson  <dino@apple.com>
 
         CrashTracer: backboardd at Recursion :: QuartzCore: CA::Render::Updater::prepare_sublayer0
index e848483..689ed00 100644 (file)
@@ -350,11 +350,11 @@ ENABLE_WEBGL = ENABLE_WEBGL;
 
 ENABLE_WEBGL2 = ENABLE_WEBGL2;
 
-ENABLE_WEBGPU = $(ENABLE_WEBGPU_$(WK_PLATFORM_NAME));
-ENABLE_WEBGPU_iphoneos = ENABLE_WEBGPU;
-ENABLE_WEBGPU_watchos = ENABLE_WEBGPU;
-ENABLE_WEBGPU_appletvos = ENABLE_WEBGPU;
-ENABLE_WEBGPU_macosx = ENABLE_WEBGPU;
+ENABLE_WEBMETAL = $(ENABLE_WEBMETAL_$(WK_PLATFORM_NAME));
+ENABLE_WEBMETAL_iphoneos = ENABLE_WEBMETAL;
+ENABLE_WEBMETAL_watchos = ENABLE_WEBMETAL;
+ENABLE_WEBMETAL_appletvos = ENABLE_WEBMETAL;
+ENABLE_WEBMETAL_macosx = ENABLE_WEBMETAL;
 
 ENABLE_WEB_AUDIO = ENABLE_WEB_AUDIO;
 
@@ -372,4 +372,4 @@ ENABLE_WIRELESS_PLAYBACK_TARGET = ENABLE_WIRELESS_PLAYBACK_TARGET;
 
 ENABLE_XSLT = ENABLE_XSLT;
 
-FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_APPLE_PAY_SESSION_V4) $(ENABLE_APPLICATION_MANIFEST) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_EXPERIMENTAL_FEATURES) $(ENABLE_FAST_JIT_PERMISSIONS) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FTL_JIT) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_JIT) $(ENABLE_JS_ASYNC_ITERATION) $(ENABLE_KEYBOARD_CODE_ATTRIBUTE) $(ENABLE_KEYBOARD_KEY_ATTRIBUTE) $(ENABLE_LAYOUT_FORMATTING_CONTEXT) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LETTERPRESS) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MAC_VIDEO_TOOLBOX) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAYMENT_REQUEST) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_LOCK) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SERVICE_WORKER) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_USER_MESSAGE_HANDLERS) $(ENABLE_USERSELECT_ALL) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_AUTHN) $(ENABLE_WEB_RTC) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBASSEMBLY_STREAMING_API) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEBGPU) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT);
+FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_APPLE_PAY_SESSION_V4) $(ENABLE_APPLICATION_MANIFEST) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_EXPERIMENTAL_FEATURES) $(ENABLE_FAST_JIT_PERMISSIONS) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FTL_JIT) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_JIT) $(ENABLE_JS_ASYNC_ITERATION) $(ENABLE_KEYBOARD_CODE_ATTRIBUTE) $(ENABLE_KEYBOARD_KEY_ATTRIBUTE) $(ENABLE_LAYOUT_FORMATTING_CONTEXT) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LETTERPRESS) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MAC_VIDEO_TOOLBOX) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAYMENT_REQUEST) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_LOCK) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SERVICE_WORKER) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_USER_MESSAGE_HANDLERS) $(ENABLE_USERSELECT_ALL) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_AUTHN) $(ENABLE_WEB_RTC) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBASSEMBLY_STREAMING_API) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEBMETAL) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT);
index 82f6458..0954c27 100644 (file)
@@ -744,28 +744,28 @@ JS_BINDING_IDLS = \
     $(WebCore)/html/canvas/WebGLUniformLocation.idl \
     $(WebCore)/html/canvas/WebGLVertexArrayObject.idl \
     $(WebCore)/html/canvas/WebGLVertexArrayObjectOES.idl \
-    $(WebCore)/html/canvas/WebGPUBuffer.idl \
-    $(WebCore)/html/canvas/WebGPUCommandBuffer.idl \
-    $(WebCore)/html/canvas/WebGPUCommandQueue.idl \
-       $(WebCore)/html/canvas/WebGPUComputeCommandEncoder.idl \
-       $(WebCore)/html/canvas/WebGPUComputePipelineState.idl \
-    $(WebCore)/html/canvas/WebGPUDepthStencilDescriptor.idl \
-    $(WebCore)/html/canvas/WebGPUDepthStencilState.idl \
-    $(WebCore)/html/canvas/WebGPUDrawable.idl \
-    $(WebCore)/html/canvas/WebGPUFunction.idl \
-    $(WebCore)/html/canvas/WebGPULibrary.idl \
-    $(WebCore)/html/canvas/WebGPURenderCommandEncoder.idl \
-    $(WebCore)/html/canvas/WebGPURenderingContext.idl \
-    $(WebCore)/html/canvas/WebGPURenderPassAttachmentDescriptor.idl \
-    $(WebCore)/html/canvas/WebGPURenderPassColorAttachmentDescriptor.idl \
-    $(WebCore)/html/canvas/WebGPURenderPassDepthAttachmentDescriptor.idl \
-    $(WebCore)/html/canvas/WebGPURenderPassDescriptor.idl \
-    $(WebCore)/html/canvas/WebGPURenderPipelineColorAttachmentDescriptor.idl \
-    $(WebCore)/html/canvas/WebGPURenderPipelineDescriptor.idl \
-    $(WebCore)/html/canvas/WebGPURenderPipelineState.idl \
-       $(WebCore)/html/canvas/WebGPUSize.idl \
-    $(WebCore)/html/canvas/WebGPUTexture.idl \
-    $(WebCore)/html/canvas/WebGPUTextureDescriptor.idl \
+    $(WebCore)/html/canvas/WebMetalBuffer.idl \
+    $(WebCore)/html/canvas/WebMetalCommandBuffer.idl \
+    $(WebCore)/html/canvas/WebMetalCommandQueue.idl \
+       $(WebCore)/html/canvas/WebMetalComputeCommandEncoder.idl \
+       $(WebCore)/html/canvas/WebMetalComputePipelineState.idl \
+    $(WebCore)/html/canvas/WebMetalDepthStencilDescriptor.idl \
+    $(WebCore)/html/canvas/WebMetalDepthStencilState.idl \
+    $(WebCore)/html/canvas/WebMetalDrawable.idl \
+    $(WebCore)/html/canvas/WebMetalFunction.idl \
+    $(WebCore)/html/canvas/WebMetalLibrary.idl \
+    $(WebCore)/html/canvas/WebMetalRenderCommandEncoder.idl \
+    $(WebCore)/html/canvas/WebMetalRenderingContext.idl \
+    $(WebCore)/html/canvas/WebMetalRenderPassAttachmentDescriptor.idl \
+    $(WebCore)/html/canvas/WebMetalRenderPassColorAttachmentDescriptor.idl \
+    $(WebCore)/html/canvas/WebMetalRenderPassDepthAttachmentDescriptor.idl \
+    $(WebCore)/html/canvas/WebMetalRenderPassDescriptor.idl \
+    $(WebCore)/html/canvas/WebMetalRenderPipelineColorAttachmentDescriptor.idl \
+    $(WebCore)/html/canvas/WebMetalRenderPipelineDescriptor.idl \
+    $(WebCore)/html/canvas/WebMetalRenderPipelineState.idl \
+       $(WebCore)/html/canvas/WebMetalSize.idl \
+    $(WebCore)/html/canvas/WebMetalTexture.idl \
+    $(WebCore)/html/canvas/WebMetalTextureDescriptor.idl \
     $(WebCore)/html/track/AudioTrack.idl \
     $(WebCore)/html/track/AudioTrackList.idl \
     $(WebCore)/html/track/DataCue.idl \
index 5940948..29fede1 100644 (file)
@@ -1,3 +1,15 @@
+2018-10-08  Justin Fan  <justin_fan@apple.com>
+
+        WebGPU: Rename old WebGPU prototype to WebMetal
+        https://bugs.webkit.org/show_bug.cgi?id=190325
+        <rdar://problem/44990443>
+
+        Reviewed by Dean Jackson.
+
+        Rename WebGPU prototype files to WebMetal in preparation for implementing the new (Oct 2018) WebGPU interface.
+
+        * Configurations/FeatureDefines.xcconfig:
+
 2018-10-08  Aditya Keerthi  <akeerthi@apple.com>
 
         Make <input type=color> a runtime enabled (on-by-default) feature
index e848483..689ed00 100644 (file)
@@ -350,11 +350,11 @@ ENABLE_WEBGL = ENABLE_WEBGL;
 
 ENABLE_WEBGL2 = ENABLE_WEBGL2;
 
-ENABLE_WEBGPU = $(ENABLE_WEBGPU_$(WK_PLATFORM_NAME));
-ENABLE_WEBGPU_iphoneos = ENABLE_WEBGPU;
-ENABLE_WEBGPU_watchos = ENABLE_WEBGPU;
-ENABLE_WEBGPU_appletvos = ENABLE_WEBGPU;
-ENABLE_WEBGPU_macosx = ENABLE_WEBGPU;
+ENABLE_WEBMETAL = $(ENABLE_WEBMETAL_$(WK_PLATFORM_NAME));
+ENABLE_WEBMETAL_iphoneos = ENABLE_WEBMETAL;
+ENABLE_WEBMETAL_watchos = ENABLE_WEBMETAL;
+ENABLE_WEBMETAL_appletvos = ENABLE_WEBMETAL;
+ENABLE_WEBMETAL_macosx = ENABLE_WEBMETAL;
 
 ENABLE_WEB_AUDIO = ENABLE_WEB_AUDIO;
 
@@ -372,4 +372,4 @@ ENABLE_WIRELESS_PLAYBACK_TARGET = ENABLE_WIRELESS_PLAYBACK_TARGET;
 
 ENABLE_XSLT = ENABLE_XSLT;
 
-FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_APPLE_PAY_SESSION_V4) $(ENABLE_APPLICATION_MANIFEST) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_EXPERIMENTAL_FEATURES) $(ENABLE_FAST_JIT_PERMISSIONS) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FTL_JIT) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_JIT) $(ENABLE_JS_ASYNC_ITERATION) $(ENABLE_KEYBOARD_CODE_ATTRIBUTE) $(ENABLE_KEYBOARD_KEY_ATTRIBUTE) $(ENABLE_LAYOUT_FORMATTING_CONTEXT) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LETTERPRESS) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MAC_VIDEO_TOOLBOX) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAYMENT_REQUEST) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_LOCK) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SERVICE_WORKER) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_USER_MESSAGE_HANDLERS) $(ENABLE_USERSELECT_ALL) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_AUTHN) $(ENABLE_WEB_RTC) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBASSEMBLY_STREAMING_API) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEBGPU) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT);
+FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_APPLE_PAY_SESSION_V4) $(ENABLE_APPLICATION_MANIFEST) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_EXPERIMENTAL_FEATURES) $(ENABLE_FAST_JIT_PERMISSIONS) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FTL_JIT) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_JIT) $(ENABLE_JS_ASYNC_ITERATION) $(ENABLE_KEYBOARD_CODE_ATTRIBUTE) $(ENABLE_KEYBOARD_KEY_ATTRIBUTE) $(ENABLE_LAYOUT_FORMATTING_CONTEXT) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LETTERPRESS) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MAC_VIDEO_TOOLBOX) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAYMENT_REQUEST) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_LOCK) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SERVICE_WORKER) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_USER_MESSAGE_HANDLERS) $(ENABLE_USERSELECT_ALL) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_AUTHN) $(ENABLE_WEB_RTC) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBASSEMBLY_STREAMING_API) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEBMETAL) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT);
index c68b253..b46e4e2 100644 (file)
@@ -455,8 +455,8 @@ bindings/js/JSVideoTrackListCustom.cpp
 bindings/js/JSWebAnimationCustom.cpp
 bindings/js/JSWebGL2RenderingContextCustom.cpp
 bindings/js/JSWebGLRenderingContextCustom.cpp
-bindings/js/JSWebGPURenderPassAttachmentDescriptorCustom.cpp
-bindings/js/JSWebGPURenderingContextCustom.cpp
+bindings/js/JSWebMetalRenderPassAttachmentDescriptorCustom.cpp
+bindings/js/JSWebMetalRenderingContextCustom.cpp
 bindings/js/JSWindowProxy.cpp
 bindings/js/JSWorkerGlobalScopeBase.cpp
 bindings/js/JSWorkerGlobalScopeCustom.cpp
@@ -1111,28 +1111,28 @@ html/canvas/ImageBitmapRenderingContext.cpp
 html/canvas/OffscreenCanvasRenderingContext2D.cpp
 html/canvas/Path2D.cpp
 html/canvas/PlaceholderRenderingContext.cpp
-html/canvas/WebGPUBuffer.cpp
-html/canvas/WebGPUCommandBuffer.cpp
-html/canvas/WebGPUCommandQueue.cpp
-html/canvas/WebGPUComputeCommandEncoder.cpp
-html/canvas/WebGPUComputePipelineState.cpp
-html/canvas/WebGPUDepthStencilDescriptor.cpp
-html/canvas/WebGPUDepthStencilState.cpp
-html/canvas/WebGPUDrawable.cpp
-html/canvas/WebGPUEnums.cpp
-html/canvas/WebGPUFunction.cpp
-html/canvas/WebGPULibrary.cpp
-html/canvas/WebGPURenderCommandEncoder.cpp
-html/canvas/WebGPURenderPassAttachmentDescriptor.cpp
-html/canvas/WebGPURenderPassColorAttachmentDescriptor.cpp
-html/canvas/WebGPURenderPassDepthAttachmentDescriptor.cpp
-html/canvas/WebGPURenderPassDescriptor.cpp
-html/canvas/WebGPURenderPipelineColorAttachmentDescriptor.cpp
-html/canvas/WebGPURenderPipelineDescriptor.cpp
-html/canvas/WebGPURenderPipelineState.cpp
-html/canvas/WebGPURenderingContext.cpp
-html/canvas/WebGPUTexture.cpp
-html/canvas/WebGPUTextureDescriptor.cpp
+html/canvas/WebMetalBuffer.cpp
+html/canvas/WebMetalCommandBuffer.cpp
+html/canvas/WebMetalCommandQueue.cpp
+html/canvas/WebMetalComputeCommandEncoder.cpp
+html/canvas/WebMetalComputePipelineState.cpp
+html/canvas/WebMetalDepthStencilDescriptor.cpp
+html/canvas/WebMetalDepthStencilState.cpp
+html/canvas/WebMetalDrawable.cpp
+html/canvas/WebMetalEnums.cpp
+html/canvas/WebMetalFunction.cpp
+html/canvas/WebMetalLibrary.cpp
+html/canvas/WebMetalRenderCommandEncoder.cpp
+html/canvas/WebMetalRenderPassAttachmentDescriptor.cpp
+html/canvas/WebMetalRenderPassColorAttachmentDescriptor.cpp
+html/canvas/WebMetalRenderPassDepthAttachmentDescriptor.cpp
+html/canvas/WebMetalRenderPassDescriptor.cpp
+html/canvas/WebMetalRenderPipelineColorAttachmentDescriptor.cpp
+html/canvas/WebMetalRenderPipelineDescriptor.cpp
+html/canvas/WebMetalRenderPipelineState.cpp
+html/canvas/WebMetalRenderingContext.cpp
+html/canvas/WebMetalTexture.cpp
+html/canvas/WebMetalTextureDescriptor.cpp
 
 html/forms/FileIconLoader.cpp
 
@@ -3144,28 +3144,28 @@ JSVisualViewport.cpp
 JSVoidCallback.cpp
 JSWaveShaperNode.cpp
 JSWebAnimation.cpp
-JSWebGPUBuffer.cpp
-JSWebGPUCommandBuffer.cpp
-JSWebGPUCommandQueue.cpp
-JSWebGPUComputeCommandEncoder.cpp
-JSWebGPUComputePipelineState.cpp
-JSWebGPUDepthStencilDescriptor.cpp
-JSWebGPUDepthStencilState.cpp
-JSWebGPUDrawable.cpp
-JSWebGPUFunction.cpp
-JSWebGPULibrary.cpp
-JSWebGPURenderCommandEncoder.cpp
-JSWebGPURenderPassAttachmentDescriptor.cpp
-JSWebGPURenderPassColorAttachmentDescriptor.cpp
-JSWebGPURenderPassDepthAttachmentDescriptor.cpp
-JSWebGPURenderPassDescriptor.cpp
-JSWebGPURenderPipelineColorAttachmentDescriptor.cpp
-JSWebGPURenderPipelineDescriptor.cpp
-JSWebGPURenderPipelineState.cpp
-JSWebGPURenderingContext.cpp
-JSWebGPUSize.cpp
-JSWebGPUTexture.cpp
-JSWebGPUTextureDescriptor.cpp
+JSWebMetalBuffer.cpp
+JSWebMetalCommandBuffer.cpp
+JSWebMetalCommandQueue.cpp
+JSWebMetalComputeCommandEncoder.cpp
+JSWebMetalComputePipelineState.cpp
+JSWebMetalDepthStencilDescriptor.cpp
+JSWebMetalDepthStencilState.cpp
+JSWebMetalDrawable.cpp
+JSWebMetalFunction.cpp
+JSWebMetalLibrary.cpp
+JSWebMetalRenderCommandEncoder.cpp
+JSWebMetalRenderPassAttachmentDescriptor.cpp
+JSWebMetalRenderPassColorAttachmentDescriptor.cpp
+JSWebMetalRenderPassDepthAttachmentDescriptor.cpp
+JSWebMetalRenderPassDescriptor.cpp
+JSWebMetalRenderPipelineColorAttachmentDescriptor.cpp
+JSWebMetalRenderPipelineDescriptor.cpp
+JSWebMetalRenderPipelineState.cpp
+JSWebMetalRenderingContext.cpp
+JSWebMetalSize.cpp
+JSWebMetalTexture.cpp
+JSWebMetalTextureDescriptor.cpp
 JSWebKitAnimationEvent.cpp
 JSWebKitCSSMatrix.cpp
 JSWebKitCSSViewportRule.cpp
index 5fc6b2e..c76f492 100644 (file)
@@ -311,7 +311,7 @@ platform/graphics/cocoa/WebActionDisablingCALayerDelegate.mm
 platform/graphics/cocoa/WebCoreCALayerExtras.mm
 platform/graphics/cocoa/WebCoreDecompressionSession.mm
 platform/graphics/cocoa/WebGLLayer.mm
-platform/graphics/cocoa/WebGPULayer.mm
+platform/graphics/cocoa/WebMetalLayer.mm
 platform/graphics/cocoa/TextTrackRepresentationCocoa.mm
 
 platform/graphics/cv/PixelBufferConformerCV.cpp
index 0b0bed4..9cfed03 100644 (file)
                314BE3A11B30F6B700141982 /* CSSNamedImageValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 314BE3A01B30F6B700141982 /* CSSNamedImageValue.h */; settings = {ATTRIBUTES = (Private, ); }; };
                314BE3A71B3103FB00141982 /* NamedImageGeneratedImage.h in Headers */ = {isa = PBXBuildFile; fileRef = 314BE3A51B3103FB00141982 /* NamedImageGeneratedImage.h */; };
                316BDB861E6E0A2700DE0D5A /* GPUDevice.h in Headers */ = {isa = PBXBuildFile; fileRef = 316BDB851E6E0A2100DE0D5A /* GPUDevice.h */; settings = {ATTRIBUTES = (Private, ); }; };
-               316BDB8C1E6E153000DE0D5A /* WebGPULayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 316BDB8A1E6E153000DE0D5A /* WebGPULayer.h */; };
+               316BDB8C1E6E153000DE0D5A /* WebMetalLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 316BDB8A1E6E153000DE0D5A /* WebMetalLayer.h */; };
                316BDB951E70C89700DE0D5A /* GPUFunction.h in Headers */ = {isa = PBXBuildFile; fileRef = 316BDB931E70C89700DE0D5A /* GPUFunction.h */; settings = {ATTRIBUTES = (Private, ); }; };
                316BDB9B1E70CBBF00DE0D5A /* GPULibrary.h in Headers */ = {isa = PBXBuildFile; fileRef = 316BDB991E70CBBF00DE0D5A /* GPULibrary.h */; settings = {ATTRIBUTES = (Private, ); }; };
                316BDBAA1E71FA9300DE0D5A /* GPUBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 316BDBA81E71FA9300DE0D5A /* GPUBuffer.h */; settings = {ATTRIBUTES = (Private, ); }; };
                316BDB841E6E0A2100DE0D5A /* GPUDevice.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GPUDevice.cpp; sourceTree = "<group>"; };
                316BDB851E6E0A2100DE0D5A /* GPUDevice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GPUDevice.h; sourceTree = "<group>"; };
                316BDB881E6E141C00DE0D5A /* GPUDeviceMetal.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = GPUDeviceMetal.mm; sourceTree = "<group>"; };
-               316BDB891E6E153000DE0D5A /* WebGPULayer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebGPULayer.mm; sourceTree = "<group>"; };
-               316BDB8A1E6E153000DE0D5A /* WebGPULayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebGPULayer.h; sourceTree = "<group>"; };
+               316BDB8A1E6E153000DE0D5A /* WebMetalLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebMetalLayer.h; sourceTree = "<group>"; };
                316BDB921E70C89700DE0D5A /* GPUFunction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GPUFunction.cpp; sourceTree = "<group>"; };
                316BDB931E70C89700DE0D5A /* GPUFunction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GPUFunction.h; sourceTree = "<group>"; };
                316BDB961E70CA2400DE0D5A /* GPUFunctionMetal.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = GPUFunctionMetal.mm; sourceTree = "<group>"; };
                D000ED2611C1B9CD00C47726 /* SubframeLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SubframeLoader.h; sourceTree = "<group>"; };
                D01A27AB10C9BFD800026A42 /* SpaceSplitString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SpaceSplitString.cpp; sourceTree = "<group>"; };
                D01A27AC10C9BFD800026A42 /* SpaceSplitString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpaceSplitString.h; sourceTree = "<group>"; };
+               D02F854E21682A4A0088EE74 /* WebMetalCommandQueue.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebMetalCommandQueue.idl; sourceTree = "<group>"; };
+               D02F855021682A560088EE74 /* WebMetalComputeCommandEncoder.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebMetalComputeCommandEncoder.idl; sourceTree = "<group>"; };
+               D02F855121682A560088EE74 /* WebMetalComputePipelineState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebMetalComputePipelineState.h; sourceTree = "<group>"; };
+               D02F855221682A910088EE74 /* WebMetalRenderPipelineState.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebMetalRenderPipelineState.h; sourceTree = "<group>"; };
+               D02F855321682A910088EE74 /* WebMetalRenderPassDescriptor.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WebMetalRenderPassDescriptor.cpp; sourceTree = "<group>"; };
+               D02F855421682A910088EE74 /* WebMetalRenderingContext.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebMetalRenderingContext.h; sourceTree = "<group>"; };
+               D02F855521682A920088EE74 /* WebMetalDepthStencilDescriptor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebMetalDepthStencilDescriptor.h; sourceTree = "<group>"; };
+               D02F855621682A920088EE74 /* WebMetalSize.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebMetalSize.idl; sourceTree = "<group>"; };
+               D02F855721682A930088EE74 /* WebMetalRenderPassAttachmentDescriptor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebMetalRenderPassAttachmentDescriptor.h; sourceTree = "<group>"; };
+               D02F855821682A930088EE74 /* WebMetalTexture.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebMetalTexture.idl; sourceTree = "<group>"; };
+               D02F855921682A940088EE74 /* WebMetalRenderPassColorAttachmentDescriptor.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WebMetalRenderPassColorAttachmentDescriptor.cpp; sourceTree = "<group>"; };
+               D02F855A21682A940088EE74 /* WebMetalRenderingContext.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebMetalRenderingContext.idl; sourceTree = "<group>"; };
+               D02F855B21682A940088EE74 /* WebMetalComputePipelineState.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WebMetalComputePipelineState.cpp; sourceTree = "<group>"; };
+               D02F855C21682A950088EE74 /* WebMetalTextureDescriptor.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebMetalTextureDescriptor.idl; sourceTree = "<group>"; };
+               D02F855D21682A950088EE74 /* WebMetalRenderPassColorAttachmentDescriptor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebMetalRenderPassColorAttachmentDescriptor.h; sourceTree = "<group>"; };
+               D02F855E21682A960088EE74 /* WebMetalRenderPipelineDescriptor.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WebMetalRenderPipelineDescriptor.cpp; sourceTree = "<group>"; };
+               D02F855F21682A960088EE74 /* WebMetalRenderPipelineState.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WebMetalRenderPipelineState.cpp; sourceTree = "<group>"; };
+               D02F856021682A970088EE74 /* WebMetalRenderPassColorAttachmentDescriptor.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebMetalRenderPassColorAttachmentDescriptor.idl; sourceTree = "<group>"; };
+               D02F856121682A970088EE74 /* WebMetalRenderPassAttachmentDescriptor.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebMetalRenderPassAttachmentDescriptor.idl; sourceTree = "<group>"; };
+               D02F856221682A980088EE74 /* WebMetalRenderCommandEncoder.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WebMetalRenderCommandEncoder.cpp; sourceTree = "<group>"; };
+               D02F856321682A980088EE74 /* WebMetalRenderCommandEncoder.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebMetalRenderCommandEncoder.h; sourceTree = "<group>"; };
+               D02F856421682A980088EE74 /* WebMetalDepthStencilState.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebMetalDepthStencilState.h; sourceTree = "<group>"; };
+               D02F856521682A990088EE74 /* WebMetalDepthStencilState.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WebMetalDepthStencilState.cpp; sourceTree = "<group>"; };
+               D02F856621682A990088EE74 /* WebMetalRenderPipelineColorAttachmentDescriptor.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WebMetalRenderPipelineColorAttachmentDescriptor.cpp; sourceTree = "<group>"; };
+               D02F856721682A9A0088EE74 /* WebMetalRenderPipelineState.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebMetalRenderPipelineState.idl; sourceTree = "<group>"; };
+               D02F856821682A9A0088EE74 /* WebMetalRenderPassDepthAttachmentDescriptor.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebMetalRenderPassDepthAttachmentDescriptor.idl; sourceTree = "<group>"; };
+               D02F856921682A9B0088EE74 /* WebMetalRenderPassDepthAttachmentDescriptor.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WebMetalRenderPassDepthAttachmentDescriptor.cpp; sourceTree = "<group>"; };
+               D02F856A21682A9B0088EE74 /* WebMetalTextureDescriptor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebMetalTextureDescriptor.h; sourceTree = "<group>"; };
+               D02F856B21682A9C0088EE74 /* WebMetalRenderPassDescriptor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebMetalRenderPassDescriptor.h; sourceTree = "<group>"; };
+               D02F856C21682A9C0088EE74 /* WebMetalLibrary.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebMetalLibrary.h; sourceTree = "<group>"; };
+               D02F856D21682A9C0088EE74 /* WebMetalSize.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebMetalSize.h; sourceTree = "<group>"; };
+               D02F856E21682A9D0088EE74 /* WebMetalTextureDescriptor.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WebMetalTextureDescriptor.cpp; sourceTree = "<group>"; };
+               D02F856F21682A9D0088EE74 /* WebMetalDrawable.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebMetalDrawable.idl; sourceTree = "<group>"; };
+               D02F857021682A9E0088EE74 /* WebMetalEnums.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WebMetalEnums.cpp; sourceTree = "<group>"; };
+               D02F857121682A9E0088EE74 /* WebMetalRenderPassAttachmentDescriptor.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WebMetalRenderPassAttachmentDescriptor.cpp; sourceTree = "<group>"; };
+               D02F857221682A9E0088EE74 /* WebMetalLibrary.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebMetalLibrary.idl; sourceTree = "<group>"; };
+               D02F857321682A9F0088EE74 /* WebMetalTexture.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebMetalTexture.h; sourceTree = "<group>"; };
+               D02F857421682A9F0088EE74 /* WebMetalEnums.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebMetalEnums.idl; sourceTree = "<group>"; };
+               D02F857521682AA00088EE74 /* WebMetalEnums.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebMetalEnums.h; sourceTree = "<group>"; };
+               D02F857621682AA00088EE74 /* WebMetalDrawable.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebMetalDrawable.h; sourceTree = "<group>"; };
+               D02F857721682AA10088EE74 /* WebMetalDepthStencilState.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebMetalDepthStencilState.idl; sourceTree = "<group>"; };
+               D02F857821682AA10088EE74 /* WebMetalDepthStencilDescriptor.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebMetalDepthStencilDescriptor.idl; sourceTree = "<group>"; };
+               D02F857921682AA20088EE74 /* WebMetalFunction.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WebMetalFunction.cpp; sourceTree = "<group>"; };
+               D02F857A21682AA20088EE74 /* WebMetalFunction.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebMetalFunction.h; sourceTree = "<group>"; };
+               D02F857B21682AA20088EE74 /* WebMetalLibrary.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WebMetalLibrary.cpp; sourceTree = "<group>"; };
+               D02F857C21682AA30088EE74 /* WebMetalRenderPipelineDescriptor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebMetalRenderPipelineDescriptor.h; sourceTree = "<group>"; };
+               D02F857D21682AA30088EE74 /* WebMetalRenderPassDepthAttachmentDescriptor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebMetalRenderPassDepthAttachmentDescriptor.h; sourceTree = "<group>"; };
+               D02F857E21682AA40088EE74 /* WebMetalRenderPassDescriptor.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebMetalRenderPassDescriptor.idl; sourceTree = "<group>"; };
+               D02F857F21682AA40088EE74 /* WebMetalDrawable.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WebMetalDrawable.cpp; sourceTree = "<group>"; };
+               D02F858021682AA40088EE74 /* WebMetalRenderPipelineDescriptor.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebMetalRenderPipelineDescriptor.idl; sourceTree = "<group>"; };
+               D02F858121682AA50088EE74 /* WebMetalRenderCommandEncoder.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebMetalRenderCommandEncoder.idl; sourceTree = "<group>"; };
+               D02F858221682AA50088EE74 /* WebMetalTexture.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WebMetalTexture.cpp; sourceTree = "<group>"; };
+               D02F858321682AA60088EE74 /* WebMetalComputePipelineState.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebMetalComputePipelineState.idl; sourceTree = "<group>"; };
+               D02F858421682AA60088EE74 /* WebMetalDepthStencilDescriptor.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WebMetalDepthStencilDescriptor.cpp; sourceTree = "<group>"; };
+               D02F858521682AA70088EE74 /* WebMetalRenderPipelineColorAttachmentDescriptor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebMetalRenderPipelineColorAttachmentDescriptor.h; sourceTree = "<group>"; };
+               D02F858621682AA70088EE74 /* WebMetalRenderPipelineColorAttachmentDescriptor.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebMetalRenderPipelineColorAttachmentDescriptor.idl; sourceTree = "<group>"; };
+               D02F858721682AA70088EE74 /* WebMetalRenderingContext.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WebMetalRenderingContext.cpp; sourceTree = "<group>"; };
+               D02F858821682AA80088EE74 /* WebMetalFunction.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebMetalFunction.idl; sourceTree = "<group>"; };
                D036DD8D208FFC0C00F9F4B2 /* WebGLCompressedTextureASTC.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebGLCompressedTextureASTC.idl; sourceTree = "<group>"; };
+               D045AD1D2168230B000A6E9B /* WebMetalLayer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebMetalLayer.mm; sourceTree = "<group>"; };
+               D045AD1E21682449000A6E9B /* JSWebMetalRenderPassAttachmentDescriptorCustom.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebMetalRenderPassAttachmentDescriptorCustom.cpp; sourceTree = "<group>"; };
+               D045AD1F21682449000A6E9B /* JSWebMetalRenderingContextCustom.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebMetalRenderingContextCustom.cpp; sourceTree = "<group>"; };
+               D045AD2021682474000A6E9B /* WebMetalComputeCommandEncoder.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebMetalComputeCommandEncoder.h; sourceTree = "<group>"; };
+               D045AD2121682474000A6E9B /* WebMetalBuffer.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WebMetalBuffer.cpp; sourceTree = "<group>"; };
+               D045AD2221682474000A6E9B /* WebMetalCommandBuffer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebMetalCommandBuffer.h; sourceTree = "<group>"; };
+               D045AD2321682475000A6E9B /* WebMetalCommandQueue.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WebMetalCommandQueue.cpp; sourceTree = "<group>"; };
                D05CED270A40BB2C00C5AF38 /* FormatBlockCommand.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = FormatBlockCommand.cpp; sourceTree = "<group>"; };
                D05CED280A40BB2C00C5AF38 /* FormatBlockCommand.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = FormatBlockCommand.h; sourceTree = "<group>"; };
                D06C0D8D0CFD11460065F43F /* RemoveFormatCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RemoveFormatCommand.h; sourceTree = "<group>"; };
                D0BC54481443AC4A00E105DA /* CachedStyleSheetClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CachedStyleSheetClient.h; sourceTree = "<group>"; };
                D0BD4F5A1408850F006839B6 /* DictationCommandIOS.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DictationCommandIOS.cpp; sourceTree = "<group>"; };
                D0BD4F5B1408850F006839B6 /* DictationCommandIOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DictationCommandIOS.h; sourceTree = "<group>"; };
+               D0CAAE98216824A6001C91C7 /* WebMetalBuffer.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebMetalBuffer.idl; sourceTree = "<group>"; };
+               D0CAAE9A216824A6001C91C7 /* WebMetalCommandBuffer.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebMetalCommandBuffer.idl; sourceTree = "<group>"; };
+               D0CAAE9B216824A7001C91C7 /* WebMetalCommandQueue.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebMetalCommandQueue.h; sourceTree = "<group>"; };
+               D0CAAE9C216824A7001C91C7 /* WebMetalComputeCommandEncoder.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WebMetalComputeCommandEncoder.cpp; sourceTree = "<group>"; };
+               D0CAAE9D216824A7001C91C7 /* WebMetalBuffer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebMetalBuffer.h; sourceTree = "<group>"; };
+               D0CAAE9E216824A8001C91C7 /* WebMetalCommandBuffer.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WebMetalCommandBuffer.cpp; sourceTree = "<group>"; };
                D0EDA772143E303C0028E383 /* CachedRawResource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CachedRawResource.cpp; sourceTree = "<group>"; };
                D0EDA773143E303C0028E383 /* CachedRawResource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CachedRawResource.h; sourceTree = "<group>"; };
                D0FF2A5B11F8C45A007E74E0 /* PingLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PingLoader.cpp; sourceTree = "<group>"; };
                                31A089011E737B4D003B6609 /* WebGPUTextureDescriptor.cpp */,
                                31A089021E737B4D003B6609 /* WebGPUTextureDescriptor.h */,
                                31A089031E737B4D003B6609 /* WebGPUTextureDescriptor.idl */,
+                               D045AD2121682474000A6E9B /* WebMetalBuffer.cpp */,
+                               D0CAAE9D216824A7001C91C7 /* WebMetalBuffer.h */,
+                               D0CAAE98216824A6001C91C7 /* WebMetalBuffer.idl */,
+                               D0CAAE9E216824A8001C91C7 /* WebMetalCommandBuffer.cpp */,
+                               D045AD2221682474000A6E9B /* WebMetalCommandBuffer.h */,
+                               D0CAAE9A216824A6001C91C7 /* WebMetalCommandBuffer.idl */,
+                               D045AD2321682475000A6E9B /* WebMetalCommandQueue.cpp */,
+                               D0CAAE9B216824A7001C91C7 /* WebMetalCommandQueue.h */,
+                               D02F854E21682A4A0088EE74 /* WebMetalCommandQueue.idl */,
+                               D0CAAE9C216824A7001C91C7 /* WebMetalComputeCommandEncoder.cpp */,
+                               D045AD2021682474000A6E9B /* WebMetalComputeCommandEncoder.h */,
+                               D02F855021682A560088EE74 /* WebMetalComputeCommandEncoder.idl */,
+                               D02F855B21682A940088EE74 /* WebMetalComputePipelineState.cpp */,
+                               D02F855121682A560088EE74 /* WebMetalComputePipelineState.h */,
+                               D02F858321682AA60088EE74 /* WebMetalComputePipelineState.idl */,
+                               D02F858421682AA60088EE74 /* WebMetalDepthStencilDescriptor.cpp */,
+                               D02F855521682A920088EE74 /* WebMetalDepthStencilDescriptor.h */,
+                               D02F857821682AA10088EE74 /* WebMetalDepthStencilDescriptor.idl */,
+                               D02F856521682A990088EE74 /* WebMetalDepthStencilState.cpp */,
+                               D02F856421682A980088EE74 /* WebMetalDepthStencilState.h */,
+                               D02F857721682AA10088EE74 /* WebMetalDepthStencilState.idl */,
+                               D02F857F21682AA40088EE74 /* WebMetalDrawable.cpp */,
+                               D02F857621682AA00088EE74 /* WebMetalDrawable.h */,
+                               D02F856F21682A9D0088EE74 /* WebMetalDrawable.idl */,
+                               D02F857021682A9E0088EE74 /* WebMetalEnums.cpp */,
+                               D02F857521682AA00088EE74 /* WebMetalEnums.h */,
+                               D02F857421682A9F0088EE74 /* WebMetalEnums.idl */,
+                               D02F857921682AA20088EE74 /* WebMetalFunction.cpp */,
+                               D02F857A21682AA20088EE74 /* WebMetalFunction.h */,
+                               D02F858821682AA80088EE74 /* WebMetalFunction.idl */,
+                               D02F857B21682AA20088EE74 /* WebMetalLibrary.cpp */,
+                               D02F856C21682A9C0088EE74 /* WebMetalLibrary.h */,
+                               D02F857221682A9E0088EE74 /* WebMetalLibrary.idl */,
+                               D02F856221682A980088EE74 /* WebMetalRenderCommandEncoder.cpp */,
+                               D02F856321682A980088EE74 /* WebMetalRenderCommandEncoder.h */,
+                               D02F858121682AA50088EE74 /* WebMetalRenderCommandEncoder.idl */,
+                               D02F858721682AA70088EE74 /* WebMetalRenderingContext.cpp */,
+                               D02F855421682A910088EE74 /* WebMetalRenderingContext.h */,
+                               D02F855A21682A940088EE74 /* WebMetalRenderingContext.idl */,
+                               D02F857121682A9E0088EE74 /* WebMetalRenderPassAttachmentDescriptor.cpp */,
+                               D02F855721682A930088EE74 /* WebMetalRenderPassAttachmentDescriptor.h */,
+                               D02F856121682A970088EE74 /* WebMetalRenderPassAttachmentDescriptor.idl */,
+                               D02F855921682A940088EE74 /* WebMetalRenderPassColorAttachmentDescriptor.cpp */,
+                               D02F855D21682A950088EE74 /* WebMetalRenderPassColorAttachmentDescriptor.h */,
+                               D02F856021682A970088EE74 /* WebMetalRenderPassColorAttachmentDescriptor.idl */,
+                               D02F856921682A9B0088EE74 /* WebMetalRenderPassDepthAttachmentDescriptor.cpp */,
+                               D02F857D21682AA30088EE74 /* WebMetalRenderPassDepthAttachmentDescriptor.h */,
+                               D02F856821682A9A0088EE74 /* WebMetalRenderPassDepthAttachmentDescriptor.idl */,
+                               D02F855321682A910088EE74 /* WebMetalRenderPassDescriptor.cpp */,
+                               D02F856B21682A9C0088EE74 /* WebMetalRenderPassDescriptor.h */,
+                               D02F857E21682AA40088EE74 /* WebMetalRenderPassDescriptor.idl */,
+                               D02F856621682A990088EE74 /* WebMetalRenderPipelineColorAttachmentDescriptor.cpp */,
+                               D02F858521682AA70088EE74 /* WebMetalRenderPipelineColorAttachmentDescriptor.h */,
+                               D02F858621682AA70088EE74 /* WebMetalRenderPipelineColorAttachmentDescriptor.idl */,
+                               D02F855E21682A960088EE74 /* WebMetalRenderPipelineDescriptor.cpp */,
+                               D02F857C21682AA30088EE74 /* WebMetalRenderPipelineDescriptor.h */,
+                               D02F858021682AA40088EE74 /* WebMetalRenderPipelineDescriptor.idl */,
+                               D02F855F21682A960088EE74 /* WebMetalRenderPipelineState.cpp */,
+                               D02F855221682A910088EE74 /* WebMetalRenderPipelineState.h */,
+                               D02F856721682A9A0088EE74 /* WebMetalRenderPipelineState.idl */,
+                               D02F856D21682A9C0088EE74 /* WebMetalSize.h */,
+                               D02F855621682A920088EE74 /* WebMetalSize.idl */,
+                               D02F858221682AA50088EE74 /* WebMetalTexture.cpp */,
+                               D02F857321682A9F0088EE74 /* WebMetalTexture.h */,
+                               D02F855821682A930088EE74 /* WebMetalTexture.idl */,
+                               D02F856E21682A9D0088EE74 /* WebMetalTextureDescriptor.cpp */,
+                               D02F856A21682A9B0088EE74 /* WebMetalTextureDescriptor.h */,
+                               D02F855C21682A950088EE74 /* WebMetalTextureDescriptor.idl */,
                        );
                        path = canvas;
                        sourceTree = "<group>";
                                CD5D27751E8318E000D80A3D /* WebCoreDecompressionSession.mm */,
                                49FFBF3D11C93EE3006A7118 /* WebGLLayer.h */,
                                49FFBF3E11C93EE3006A7118 /* WebGLLayer.mm */,
-                               316BDB8A1E6E153000DE0D5A /* WebGPULayer.h */,
-                               316BDB891E6E153000DE0D5A /* WebGPULayer.mm */,
+                               316BDB8A1E6E153000DE0D5A /* WebMetalLayer.h */,
+                               D045AD1D2168230B000A6E9B /* WebMetalLayer.mm */,
                        );
                        path = cocoa;
                        sourceTree = "<group>";
                                46BCBBC12085008000710638 /* JSRemoteDOMWindowBase.cpp */,
                                46BCBBC02085007F00710638 /* JSRemoteDOMWindowBase.h */,
                                931AE3B81FB80EAE00F5EFB2 /* JSValueInWrappedObject.h */,
+                               D045AD1F21682449000A6E9B /* JSWebMetalRenderingContextCustom.cpp */,
+                               D045AD1E21682449000A6E9B /* JSWebMetalRenderPassAttachmentDescriptorCustom.cpp */,
                                BCBFB53A0DCD29CF0019B3E5 /* JSWindowProxy.cpp */,
                                BCBFB53B0DCD29CF0019B3E5 /* JSWindowProxy.h */,
                                E1C36D320EB0A094007410BC /* JSWorkerGlobalScopeBase.cpp */,
                                0C3F1F5B10C8871200D72CE1 /* WebGLUniformLocation.h in Headers */,
                                6F995A261A7078B100A735F4 /* WebGLVertexArrayObject.h in Headers */,
                                77A17A7812F28642004E02F6 /* WebGLVertexArrayObjectOES.h in Headers */,
-                               316BDB8C1E6E153000DE0D5A /* WebGPULayer.h in Headers */,
                                A5B81CB71FAA44620037D1E6 /* WebHeapAgent.h in Headers */,
                                A5840E25187B8AC200843B10 /* WebInjectedScriptHost.h in Headers */,
                                A584FE301864CB8400843B10 /* WebInjectedScriptManager.h in Headers */,
                                0709D78F1AE55554004E42F8 /* WebMediaSessionManager.h in Headers */,
                                0709D7951AE55A29004E42F8 /* WebMediaSessionManagerClient.h in Headers */,
                                0709D7931AE5557E004E42F8 /* WebMediaSessionManagerMac.h in Headers */,
+                               316BDB8C1E6E153000DE0D5A /* WebMetalLayer.h in Headers */,
                                E1A3162D134BC32D007C9A4F /* WebNSAttributedStringExtras.h in Headers */,
                                CD5896E21CD2B15100B3BCC8 /* WebPlaybackControlsManager.h in Headers */,
                                1CAF34810A6C405200ABE06E /* WebScriptObject.h in Headers */,
  */
 
 #include "config.h"
-#include "JSWebGPURenderPassAttachmentDescriptor.h"
+#include "JSWebMetalRenderPassAttachmentDescriptor.h"
 
-#if ENABLE(WEBGPU)
+#if ENABLE(WEBMETAL)
 
 #include "JSDOMBinding.h"
-#include "JSWebGPURenderPassColorAttachmentDescriptor.h"
-#include "JSWebGPURenderPassDepthAttachmentDescriptor.h"
-#include "WebGPURenderPassColorAttachmentDescriptor.h"
-#include "WebGPURenderPassDepthAttachmentDescriptor.h"
+#include "JSWebMetalRenderPassColorAttachmentDescriptor.h"
+#include "JSWebMetalRenderPassDepthAttachmentDescriptor.h"
+#include "WebMetalRenderPassColorAttachmentDescriptor.h"
+#include "WebMetalRenderPassDepthAttachmentDescriptor.h"
 
 namespace WebCore {
 
-JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, Ref<WebGPURenderPassAttachmentDescriptor>&& object)
+JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, Ref<WebMetalRenderPassAttachmentDescriptor>&& object)
 {
     if (object->isColorAttachmentDescriptor())
-        return createWrapper<WebGPURenderPassColorAttachmentDescriptor>(globalObject, WTFMove(object));
-    return createWrapper<WebGPURenderPassDepthAttachmentDescriptor>(globalObject, WTFMove(object));
+        return createWrapper<WebMetalRenderPassColorAttachmentDescriptor>(globalObject, WTFMove(object));
+    return createWrapper<WebMetalRenderPassDepthAttachmentDescriptor>(globalObject, WTFMove(object));
 }
 
-JSValue toJS(ExecState* state, JSDOMGlobalObject* globalObject, WebGPURenderPassAttachmentDescriptor& object)
+JSValue toJS(ExecState* state, JSDOMGlobalObject* globalObject, WebMetalRenderPassAttachmentDescriptor& object)
 {
     return wrap(state, globalObject, object);
 }
  */
 
 #include "config.h"
-#include "JSWebGPURenderingContext.h"
+#include "JSWebMetalRenderingContext.h"
 
-#if ENABLE(WEBGPU)
+#if ENABLE(WEBMETAL)
 
 
 namespace WebCore {
 using namespace JSC;
 
-void JSWebGPURenderingContext::visitAdditionalChildren(SlotVisitor& visitor)
+void JSWebMetalRenderingContext::visitAdditionalChildren(SlotVisitor& visitor)
 {
     visitor.addOpaqueRoot(&wrapped());
 }
index c852414..929d3aa 100644 (file)
@@ -164,28 +164,28 @@ namespace WebCore {
     macro(VisualViewport) \
     macro(WebGL2RenderingContext) \
     macro(WebGLVertexArrayObject) \
-    macro(WebGPUBuffer) \
-    macro(WebGPUCommandBuffer) \
-    macro(WebGPUCommandQueue) \
-    macro(WebGPUComputeCommandEncoder) \
-    macro(WebGPUComputePipelineState) \
-    macro(WebGPUDepthStencilDescriptor) \
-    macro(WebGPUDepthStencilState) \
-    macro(WebGPUDrawable) \
-    macro(WebGPUFunction) \
-    macro(WebGPULibrary) \
-    macro(WebGPURenderCommandEncoder) \
-    macro(WebGPURenderPassAttachmentDescriptor) \
-    macro(WebGPURenderPassColorAttachmentDescriptor) \
-    macro(WebGPURenderPassDepthAttachmentDescriptor) \
-    macro(WebGPURenderPassDescriptor) \
-    macro(WebGPURenderPipelineColorAttachmentDescriptor) \
-    macro(WebGPURenderPipelineDescriptor) \
-    macro(WebGPURenderPipelineState) \
-    macro(WebGPURenderingContext) \
-    macro(WebGPUSize) \
-    macro(WebGPUTexture) \
-    macro(WebGPUTextureDescriptor) \
+    macro(WebMetalBuffer) \
+    macro(WebMetalCommandBuffer) \
+    macro(WebMetalCommandQueue) \
+    macro(WebMetalComputeCommandEncoder) \
+    macro(WebMetalComputePipelineState) \
+    macro(WebMetalDepthStencilDescriptor) \
+    macro(WebMetalDepthStencilState) \
+    macro(WebMetalDrawable) \
+    macro(WebMetalFunction) \
+    macro(WebMetalLibrary) \
+    macro(WebMetalRenderCommandEncoder) \
+    macro(WebMetalRenderPassAttachmentDescriptor) \
+    macro(WebMetalRenderPassColorAttachmentDescriptor) \
+    macro(WebMetalRenderPassDepthAttachmentDescriptor) \
+    macro(WebMetalRenderPassDescriptor) \
+    macro(WebMetalRenderPipelineColorAttachmentDescriptor) \
+    macro(WebMetalRenderPipelineDescriptor) \
+    macro(WebMetalRenderPipelineState) \
+    macro(WebMetalRenderingContext) \
+    macro(WebMetalSize) \
+    macro(WebMetalTexture) \
+    macro(WebMetalTextureDescriptor) \
     macro(WebKitMediaKeyError) \
     macro(WebKitMediaKeyMessageEvent) \
     macro(WebKitMediaKeyNeededEvent) \
index 752c850..ea285e2 100644 (file)
 #if ENABLE(WEBGL2)
 #include "WebGL2RenderingContext.h"
 #endif
-#if ENABLE(WEBGPU)
-#include "WebGPURenderingContext.h"
+#if ENABLE(WEBMETAL)
+#include "WebMetalRenderingContext.h"
 #endif
 
 
@@ -5829,9 +5829,9 @@ std::optional<RenderingContext> Document::getCSSCanvasContext(const String& type
     if (is<WebGL2RenderingContext>(*context))
         return RenderingContext { RefPtr<WebGL2RenderingContext> { &downcast<WebGL2RenderingContext>(*context) } };
 #endif
-#if ENABLE(WEBGPU)
-    if (is<WebGPURenderingContext>(*context))
-        return RenderingContext { RefPtr<WebGPURenderingContext> { &downcast<WebGPURenderingContext>(*context) } };
+#if ENABLE(WEBMETAL)
+    if (is<WebMetalRenderingContext>(*context))
+        return RenderingContext { RefPtr<WebMetalRenderingContext> { &downcast<WebMetalRenderingContext>(*context) } };
 #endif
 
     return RenderingContext { RefPtr<CanvasRenderingContext2D> { &downcast<CanvasRenderingContext2D>(*context) } };
index c6b15d7..e2cf60c 100644 (file)
@@ -190,7 +190,7 @@ class VisitedLinkState;
 class WebAnimation;
 class WebGL2RenderingContext;
 class WebGLRenderingContext;
-class WebGPURenderingContext;
+class WebMetalRenderingContext;
 class WindowProxy;
 class XPathEvaluator;
 class XPathExpression;
@@ -317,8 +317,8 @@ using RenderingContext = Variant<
 #if ENABLE(WEBGL2)
     RefPtr<WebGL2RenderingContext>,
 #endif
-#if ENABLE(WEBGPU)
-    RefPtr<WebGPURenderingContext>,
+#if ENABLE(WEBMETAL)
+    RefPtr<WebMetalRenderingContext>,
 #endif
     RefPtr<ImageBitmapRenderingContext>,
     RefPtr<CanvasRenderingContext2D>
index 426a294..1a88619 100644 (file)
@@ -25,8 +25,8 @@ typedef (
 #if defined(ENABLE_WEBGL2) && ENABLE_WEBGL2
     WebGL2RenderingContext or
 #endif
-#if defined(ENABLE_WEBGPU) && ENABLE_WEBGPU
-    WebGPURenderingContext or
+#if defined(ENABLE_WEBMETAL) && ENABLE_WEBMETAL
+    WebMetalRenderingContext or
 #endif
     ImageBitmapRenderingContext or 
     CanvasRenderingContext2D) RenderingContext;
index 8f70e97..b1df9d7 100644 (file)
@@ -75,8 +75,8 @@
 #include "WebGL2RenderingContext.h"
 #endif
 
-#if ENABLE(WEBGPU)
-#include "WebGPURenderingContext.h"
+#if ENABLE(WEBMETAL)
+#include "WebMetalRenderingContext.h"
 #endif
 
 #if PLATFORM(COCOA)
@@ -238,11 +238,11 @@ ExceptionOr<std::optional<RenderingContext>> HTMLCanvasElement::getContext(JSC::
         }
 #endif
 
-#if ENABLE(WEBGPU)
-        if (m_context->isWebGPU()) {
-            if (!isWebGPUType(contextId))
+#if ENABLE(WEBMETAL)
+        if (m_context->isWebMetal()) {
+            if (!isWebMetalType(contextId))
                 return std::optional<RenderingContext> { std::nullopt };
-            return std::optional<RenderingContext> { RefPtr<WebGPURenderingContext> { &downcast<WebGPURenderingContext>(*m_context) } };
+            return std::optional<RenderingContext> { RefPtr<WebMetalRenderingContext> { &downcast<WebMetalRenderingContext>(*m_context) } };
         }
 #endif
 
@@ -287,12 +287,12 @@ ExceptionOr<std::optional<RenderingContext>> HTMLCanvasElement::getContext(JSC::
     }
 #endif
 
-#if ENABLE(WEBGPU)
-    if (isWebGPUType(contextId)) {
-        auto context = createContextWebGPU(contextId);
+#if ENABLE(WEBMETAL)
+    if (isWebMetalType(contextId)) {
+        auto context = createContextWebMetal(contextId);
         if (!context)
             return std::optional<RenderingContext> { std::nullopt };
-        return std::optional<RenderingContext> { RefPtr<WebGPURenderingContext> { context } };
+        return std::optional<RenderingContext> { RefPtr<WebMetalRenderingContext> { context } };
     }
 #endif
 
@@ -307,9 +307,9 @@ CanvasRenderingContext* HTMLCanvasElement::getContext(const String& type)
     if (HTMLCanvasElement::isBitmapRendererType(type))
         return getContextBitmapRenderer(type);
 
-#if ENABLE(WEBGPU)
-    if (HTMLCanvasElement::isWebGPUType(type) && RuntimeEnabledFeatures::sharedFeatures().webGPUEnabled())
-        return getContextWebGPU(type);
+#if ENABLE(WEBMETAL)
+    if (HTMLCanvasElement::isWebMetalType(type) && RuntimeEnabledFeatures::sharedFeatures().webMetalEnabled())
+        return getContextWebMetal(type);
 #endif
 
 #if ENABLE(WEBGL)
@@ -437,43 +437,43 @@ WebGLRenderingContextBase* HTMLCanvasElement::getContextWebGL(const String& type
 
 #endif // ENABLE(WEBGL)
 
-#if ENABLE(WEBGPU)
+#if ENABLE(WEBMETAL)
 
-bool HTMLCanvasElement::isWebGPUType(const String& type)
+bool HTMLCanvasElement::isWebMetalType(const String& type)
 {
-    return type == "webgpu";
+    return type == "webmetal";
 }
 
-WebGPURenderingContext* HTMLCanvasElement::createContextWebGPU(const String& type)
+WebMetalRenderingContext* HTMLCanvasElement::createContextWebMetal(const String& type)
 {
-    ASSERT_UNUSED(type, HTMLCanvasElement::isWebGPUType(type));
+    ASSERT_UNUSED(type, HTMLCanvasElement::isWebMetalType(type));
     ASSERT(!m_context);
 
-    if (!RuntimeEnabledFeatures::sharedFeatures().webGPUEnabled())
+    if (!RuntimeEnabledFeatures::sharedFeatures().webMetalEnabled())
         return nullptr;
 
-    m_context = WebGPURenderingContext::create(*this);
+    m_context = WebMetalRenderingContext::create(*this);
     if (m_context) {
         // Need to make sure a RenderLayer and compositing layer get created for the Canvas.
         invalidateStyleAndLayerComposition();
     }
 
-    return static_cast<WebGPURenderingContext*>(m_context.get());
+    return static_cast<WebMetalRenderingContext*>(m_context.get());
 }
 
-WebGPURenderingContext* HTMLCanvasElement::getContextWebGPU(const String& type)
+WebMetalRenderingContext* HTMLCanvasElement::getContextWebMetal(const String& type)
 {
-    ASSERT_UNUSED(type, HTMLCanvasElement::isWebGPUType(type));
+    ASSERT_UNUSED(type, HTMLCanvasElement::isWebMetalType(type));
 
-    if (!RuntimeEnabledFeatures::sharedFeatures().webGPUEnabled())
+    if (!RuntimeEnabledFeatures::sharedFeatures().webMetalEnabled())
         return nullptr;
 
-    if (m_context && !m_context->isWebGPU())
+    if (m_context && !m_context->isWebMetal())
         return nullptr;
 
     if (!m_context)
-        return createContextWebGPU(type);
-    return static_cast<WebGPURenderingContext*>(m_context.get());
+        return createContextWebMetal(type);
+    return static_cast<WebMetalRenderingContext*>(m_context.get());
 }
 #endif
 
index f88d611..2df9c0b 100644 (file)
@@ -51,7 +51,7 @@ class ImageData;
 class MediaSample;
 class MediaStream;
 class WebGLRenderingContextBase;
-class WebGPURenderingContext;
+class WebMetalRenderingContext;
 struct UncachedString;
 
 namespace DisplayList {
@@ -97,10 +97,10 @@ public:
     WebGLRenderingContextBase* createContextWebGL(const String&, WebGLContextAttributes&& = { });
     WebGLRenderingContextBase* getContextWebGL(const String&, WebGLContextAttributes&& = { });
 #endif
-#if ENABLE(WEBGPU)
-    static bool isWebGPUType(const String&);
-    WebGPURenderingContext* createContextWebGPU(const String&);
-    WebGPURenderingContext* getContextWebGPU(const String&);
+#if ENABLE(WEBMETAL)
+    static bool isWebMetalType(const String&);
+    WebMetalRenderingContext* createContextWebMetal(const String&);
+    WebMetalRenderingContext* getContextWebMetal(const String&);
 #endif
 
     static bool isBitmapRendererType(const String&);
index 6157ea1..ff123b2 100644 (file)
@@ -31,8 +31,8 @@ typedef (
 #if defined(ENABLE_WEBGL2) && ENABLE_WEBGL2
     WebGL2RenderingContext or
 #endif
-#if defined(ENABLE_WEBGPU) && ENABLE_WEBGPU
-    WebGPURenderingContext or
+#if defined(ENABLE_WEBMETAL) && ENABLE_WEBMETAL
+    WebMetalRenderingContext or
 #endif
     ImageBitmapRenderingContext or 
     CanvasRenderingContext2D) RenderingContext;
index 81cb55d..2d2d887 100644 (file)
@@ -55,8 +55,8 @@ public:
     virtual bool isWebGL1() const { return false; }
     virtual bool isWebGL2() const { return false; }
     bool isWebGL() const { return isWebGL1() || isWebGL2(); }
-#if ENABLE(WEBGPU)
-    virtual bool isWebGPU() const { return false; }
+#if ENABLE(WEBMETAL)
+    virtual bool isWebMetal() const { return false; }
 #endif
     virtual bool isGPUBased() const { return false; }
     virtual bool isAccelerated() const { return false; }
diff --git a/Source/WebCore/html/canvas/WebGPURenderingContext.cpp b/Source/WebCore/html/canvas/WebGPURenderingContext.cpp
deleted file mode 100644 (file)
index be1a1e7..0000000
+++ /dev/null
@@ -1,196 +0,0 @@
-/*
- * Copyright (C) 2017 Apple Inc. All rights reserved.
- * Copyright (C) 2017 Yuichiro Kikura (y.kikura@gmail.com)
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "WebGPURenderingContext.h"
-
-#if ENABLE(WEBGPU)
-
-#include "Document.h"
-#include "FrameView.h"
-#include "GPUDevice.h"
-#include "InspectorInstrumentation.h"
-#include "WebGPUBuffer.h"
-#include "WebGPUCommandQueue.h"
-#include "WebGPUComputePipelineState.h"
-#include "WebGPUDepthStencilDescriptor.h"
-#include "WebGPUDepthStencilState.h"
-#include "WebGPUDrawable.h"
-#include "WebGPUFunction.h"
-#include "WebGPULibrary.h"
-#include "WebGPURenderPassDescriptor.h"
-#include "WebGPURenderPipelineDescriptor.h"
-#include "WebGPURenderPipelineState.h"
-#include "WebGPUTexture.h"
-#include "WebGPUTextureDescriptor.h"
-#include <JavaScriptCore/ArrayBuffer.h>
-#include <JavaScriptCore/JSCInlines.h>
-#include <JavaScriptCore/TypedArrayInlines.h>
-#include <JavaScriptCore/Uint32Array.h>
-#include <wtf/StdLibExtras.h>
-#include <wtf/text/CString.h>
-
-namespace {
-
-int clamp(int value, int min, int max)
-{
-    if (value < min)
-        value = min;
-    if (value > max)
-        value = max;
-    return value;
-}
-
-}
-
-namespace WebCore {
-
-static const int kMaxTextureSize = 4096;
-
-std::unique_ptr<WebGPURenderingContext> WebGPURenderingContext::create(CanvasBase& canvas)
-{
-    GPUDevice device;
-
-    if (!device) {
-        // FIXME: WebGPU - dispatch an event here for the failure.
-        return nullptr;
-    }
-
-    auto renderingContext = std::unique_ptr<WebGPURenderingContext>(new WebGPURenderingContext(canvas, WTFMove(device)));
-    renderingContext->suspendIfNeeded();
-
-    InspectorInstrumentation::didCreateCanvasRenderingContext(*renderingContext);
-
-    return renderingContext;
-}
-
-WebGPURenderingContext::WebGPURenderingContext(CanvasBase& canvas, GPUDevice&& device)
-    : GPUBasedCanvasRenderingContext(canvas)
-    , m_device(WTFMove(device))
-{
-    initializeNewContext();
-}
-
-HTMLCanvasElement* WebGPURenderingContext::canvas() const
-{
-    auto& base = canvasBase();
-    if (!is<HTMLCanvasElement>(base))
-        return nullptr;
-    return &downcast<HTMLCanvasElement>(base);
-}
-
-void WebGPURenderingContext::initializeNewContext()
-{
-    // FIXME: WebGPU - Maybe we should reset a bunch of stuff here.
-
-    IntSize canvasSize = clampedCanvasSize();
-    m_device.reshape(canvasSize.width(), canvasSize.height());
-}
-
-IntSize WebGPURenderingContext::clampedCanvasSize() const
-{
-    return IntSize(clamp(canvas()->width(), 1, kMaxTextureSize),
-        clamp(canvas()->height(), 1, kMaxTextureSize));
-}
-
-bool WebGPURenderingContext::hasPendingActivity() const
-{
-    return false;
-}
-
-void WebGPURenderingContext::stop()
-{
-}
-
-const char* WebGPURenderingContext::activeDOMObjectName() const
-{
-    return "WebGPURenderingContext";
-}
-
-bool WebGPURenderingContext::canSuspendForDocumentSuspension() const
-{
-    return false;
-}
-
-PlatformLayer* WebGPURenderingContext::platformLayer() const
-{
-    return m_device.platformLayer();
-}
-
-void WebGPURenderingContext::markLayerComposited()
-{
-    m_device.markLayerComposited();
-}
-
-void WebGPURenderingContext::reshape(int width, int height)
-{
-    // FIXME: WebGPU - Do we need to reset stuff here?
-    m_device.reshape(width, height);
-}
-
-Ref<WebGPULibrary> WebGPURenderingContext::createLibrary(const String& sourceCode)
-{
-    return WebGPULibrary::create(GPULibrary { m_device, sourceCode }, sourceCode);
-}
-
-Ref<WebGPURenderPipelineState> WebGPURenderingContext::createRenderPipelineState(WebGPURenderPipelineDescriptor& descriptor)
-{
-    return WebGPURenderPipelineState::create(GPURenderPipelineState { m_device, descriptor.descriptor() });
-}
-
-Ref<WebGPUDepthStencilState> WebGPURenderingContext::createDepthStencilState(WebGPUDepthStencilDescriptor& descriptor)
-{
-    return WebGPUDepthStencilState::create(GPUDepthStencilState { m_device, descriptor.descriptor() });
-}
-
-Ref<WebGPUComputePipelineState> WebGPURenderingContext::createComputePipelineState(WebGPUFunction& function)
-{
-    return WebGPUComputePipelineState::create(GPUComputePipelineState { m_device, function.function() });
-}
-
-Ref<WebGPUCommandQueue> WebGPURenderingContext::createCommandQueue()
-{
-    return WebGPUCommandQueue::create(GPUCommandQueue { m_device });
-}
-
-Ref<WebGPUDrawable> WebGPURenderingContext::nextDrawable()
-{
-    return WebGPUDrawable::create(GPUDrawable { m_device });
-}
-
-RefPtr<WebGPUBuffer> WebGPURenderingContext::createBuffer(JSC::ArrayBufferView& data)
-{
-    return WebGPUBuffer::create(GPUBuffer { m_device, data });
-}
-
-Ref<WebGPUTexture> WebGPURenderingContext::createTexture(WebGPUTextureDescriptor& descriptor)
-{
-    return WebGPUTexture::create(GPUTexture { m_device, descriptor.descriptor() });
-}
-
-} // namespace WebCore
-
-#endif
similarity index 87%
rename from Source/WebCore/html/canvas/WebGPUBuffer.cpp
rename to Source/WebCore/html/canvas/WebMetalBuffer.cpp
index 953f474..bd301ee 100644 (file)
  */
 
 #include "config.h"
-#include "WebGPUBuffer.h"
+#include "WebMetalBuffer.h"
 
-#if ENABLE(WEBGPU)
+#if ENABLE(WEBMETAL)
 
 namespace WebCore {
 
-RefPtr<WebGPUBuffer> WebGPUBuffer::create(GPUBuffer&& buffer)
+RefPtr<WebMetalBuffer> WebMetalBuffer::create(GPUBuffer&& buffer)
 {
     // FIXME: Consider returning null rather than a buffer with length 0 and contents null when creation fails.
-    return adoptRef(*new WebGPUBuffer(WTFMove(buffer)));
+    return adoptRef(*new WebMetalBuffer(WTFMove(buffer)));
 }
 
-WebGPUBuffer::WebGPUBuffer(GPUBuffer&& buffer)
+WebMetalBuffer::WebMetalBuffer(GPUBuffer&& buffer)
     : m_buffer { WTFMove(buffer) }
 {
 }
similarity index 90%
rename from Source/WebCore/html/canvas/WebGPUBuffer.h
rename to Source/WebCore/html/canvas/WebMetalBuffer.h
index 16ce4f6..2e341a7 100644 (file)
@@ -25,7 +25,7 @@
 
 #pragma once
 
-#if ENABLE(WEBGPU)
+#if ENABLE(WEBMETAL)
 
 #include "GPUBuffer.h"
 #include <wtf/RefCounted.h>
@@ -33,9 +33,9 @@
 
 namespace WebCore {
 
-class WebGPUBuffer : public RefCounted<WebGPUBuffer> {
+class WebMetalBuffer : public RefCounted<WebMetalBuffer> {
 public:
-    static RefPtr<WebGPUBuffer> create(GPUBuffer&&);
+    static RefPtr<WebMetalBuffer> create(GPUBuffer&&);
 
     unsigned length() const { return m_buffer.length(); }
     JSC::ArrayBuffer& contents() const { return *m_buffer.contents(); }
@@ -43,7 +43,7 @@ public:
     const GPUBuffer& buffer() const { return m_buffer; }
 
 private:
-    explicit WebGPUBuffer(GPUBuffer&&);
+    explicit WebMetalBuffer(GPUBuffer&&);
 
     GPUBuffer m_buffer;
 };
similarity index 94%
rename from Source/WebCore/html/canvas/WebGPUBuffer.idl
rename to Source/WebCore/html/canvas/WebMetalBuffer.idl
index 5f107d3..a275356 100644 (file)
  */
 
 [
-    Conditional=WEBGPU,
-    EnabledAtRuntime=WebGPU,
+    Conditional=WEBMETAL,
+    EnabledAtRuntime=WebMetal,
     ImplementationLacksVTable
-] interface WebGPUBuffer {
+] interface WebMetalBuffer {
 
     readonly attribute unsigned long length;
     readonly attribute ArrayBufferView contents;
  */
 
 #include "config.h"
-#include "WebGPUCommandBuffer.h"
+#include "WebMetalCommandBuffer.h"
 
-#if ENABLE(WEBGPU)
+#if ENABLE(WEBMETAL)
 
 #include "GPUCommandBuffer.h"
 #include "GPUCommandQueue.h"
 #include "Logging.h"
-#include "WebGPUComputeCommandEncoder.h"
-#include "WebGPUDrawable.h"
-#include "WebGPURenderCommandEncoder.h"
-#include "WebGPURenderPassDescriptor.h"
+#include "WebMetalComputeCommandEncoder.h"
+#include "WebMetalDrawable.h"
+#include "WebMetalRenderCommandEncoder.h"
+#include "WebMetalRenderPassDescriptor.h"
 
 namespace WebCore {
 
-Ref<WebGPUCommandBuffer> WebGPUCommandBuffer::create(const GPUCommandQueue& queue)
+Ref<WebMetalCommandBuffer> WebMetalCommandBuffer::create(const GPUCommandQueue& queue)
 {
-    return adoptRef(*new WebGPUCommandBuffer(queue));
+    return adoptRef(*new WebMetalCommandBuffer(queue));
 }
 
-WebGPUCommandBuffer::WebGPUCommandBuffer(const GPUCommandQueue& queue)
+WebMetalCommandBuffer::WebMetalCommandBuffer(const GPUCommandQueue& queue)
     : m_buffer { queue, [this] () { m_completed.resolve(); } }
 {
-    LOG(WebGPU, "WebGPUCommandBuffer::WebGPUCommandBuffer()");
+    LOG(WebMetal, "WebMetalCommandBuffer::WebMetalCommandBuffer()");
 }
 
-WebGPUCommandBuffer::~WebGPUCommandBuffer()
+WebMetalCommandBuffer::~WebMetalCommandBuffer()
 {
-    LOG(WebGPU, "WebGPUCommandBuffer::~WebGPUCommandBuffer()");
+    LOG(WebMetal, "WebMetalCommandBuffer::~WebMetalCommandBuffer()");
 }
 
-void WebGPUCommandBuffer::commit()
+void WebMetalCommandBuffer::commit()
 {
-    LOG(WebGPU, "WebGPUCommandBuffer::commit()");
+    LOG(WebMetal, "WebMetalCommandBuffer::commit()");
     m_buffer.commit();
 }
 
-void WebGPUCommandBuffer::presentDrawable(WebGPUDrawable& drawable)
+void WebMetalCommandBuffer::presentDrawable(WebMetalDrawable& drawable)
 {
-    LOG(WebGPU, "WebGPUCommandBuffer::presentDrawable()");
+    LOG(WebMetal, "WebMetalCommandBuffer::presentDrawable()");
     m_buffer.presentDrawable(drawable.drawable());
 }
 
-Ref<WebGPURenderCommandEncoder> WebGPUCommandBuffer::createRenderCommandEncoderWithDescriptor(WebGPURenderPassDescriptor& descriptor)
+Ref<WebMetalRenderCommandEncoder> WebMetalCommandBuffer::createRenderCommandEncoderWithDescriptor(WebMetalRenderPassDescriptor& descriptor)
 {
-    return WebGPURenderCommandEncoder::create(GPURenderCommandEncoder { m_buffer, descriptor.descriptor() });
+    return WebMetalRenderCommandEncoder::create(GPURenderCommandEncoder { m_buffer, descriptor.descriptor() });
 }
 
-Ref<WebGPUComputeCommandEncoder> WebGPUCommandBuffer::createComputeCommandEncoder()
+Ref<WebMetalComputeCommandEncoder> WebMetalCommandBuffer::createComputeCommandEncoder()
 {
-    return WebGPUComputeCommandEncoder::create(GPUComputeCommandEncoder { m_buffer });
+    return WebMetalComputeCommandEncoder::create(GPUComputeCommandEncoder { m_buffer });
 }
 
-DOMPromiseProxy<IDLVoid>& WebGPUCommandBuffer::completed()
+DOMPromiseProxy<IDLVoid>& WebMetalCommandBuffer::completed()
 {
     return m_completed;
 }
@@ -26,7 +26,7 @@
 
 #pragma once
 
-#if ENABLE(WEBGPU)
+#if ENABLE(WEBMETAL)
 
 #include "DOMPromiseProxy.h"
 #include "GPUCommandBuffer.h"
 
 namespace WebCore {
 
-class WebGPUComputeCommandEncoder;
-class WebGPUDrawable;
-class WebGPURenderCommandEncoder;
-class WebGPURenderPassDescriptor;
+class WebMetalComputeCommandEncoder;
+class WebMetalDrawable;
+class WebMetalRenderCommandEncoder;
+class WebMetalRenderPassDescriptor;
 
-class WebGPUCommandBuffer : public RefCounted<WebGPUCommandBuffer> {
+class WebMetalCommandBuffer : public RefCounted<WebMetalCommandBuffer> {
 public:
-    ~WebGPUCommandBuffer();
-    static Ref<WebGPUCommandBuffer> create(const GPUCommandQueue&);
+    ~WebMetalCommandBuffer();
+    static Ref<WebMetalCommandBuffer> create(const GPUCommandQueue&);
 
     void commit();
-    void presentDrawable(WebGPUDrawable&);
+    void presentDrawable(WebMetalDrawable&);
 
-    Ref<WebGPURenderCommandEncoder> createRenderCommandEncoderWithDescriptor(WebGPURenderPassDescriptor&);
-    Ref<WebGPUComputeCommandEncoder> createComputeCommandEncoder();
+    Ref<WebMetalRenderCommandEncoder> createRenderCommandEncoderWithDescriptor(WebMetalRenderPassDescriptor&);
+    Ref<WebMetalComputeCommandEncoder> createComputeCommandEncoder();
 
     DOMPromiseProxy<IDLVoid>& completed();
 
     const GPUCommandBuffer& buffer() const { return m_buffer; }
 
 private:
-    explicit WebGPUCommandBuffer(const GPUCommandQueue&);
+    explicit WebMetalCommandBuffer(const GPUCommandQueue&);
 
     GPUCommandBuffer m_buffer;
     DOMPromiseProxy<IDLVoid> m_completed;
  */
 
 [
-    Conditional=WEBGPU,
-    EnabledAtRuntime=WebGPU,
+    Conditional=WEBMETAL,
+    EnabledAtRuntime=WebMetal,
     ImplementationLacksVTable
-] interface WebGPUCommandBuffer {
-    WebGPURenderCommandEncoder createRenderCommandEncoderWithDescriptor(WebGPURenderPassDescriptor descriptor);
-    WebGPUComputeCommandEncoder createComputeCommandEncoder();
+] interface WebMetalCommandBuffer {
+    WebMetalRenderCommandEncoder createRenderCommandEncoderWithDescriptor(WebMetalRenderPassDescriptor descriptor);
+    WebMetalComputeCommandEncoder createComputeCommandEncoder();
     void commit();
-    void presentDrawable(WebGPUDrawable drawable);
+    void presentDrawable(WebMetalDrawable drawable);
     readonly attribute Promise<void> completed;
 };
  */
 
 #include "config.h"
-#include "WebGPUCommandQueue.h"
+#include "WebMetalCommandQueue.h"
 
-#if ENABLE(WEBGPU)
+#if ENABLE(WEBMETAL)
 
-#include "WebGPUCommandBuffer.h"
+#include "WebMetalCommandBuffer.h"
 
 namespace WebCore {
 
-Ref<WebGPUCommandQueue> WebGPUCommandQueue::create(GPUCommandQueue&& queue)
+Ref<WebMetalCommandQueue> WebMetalCommandQueue::create(GPUCommandQueue&& queue)
 {
-    return adoptRef(*new WebGPUCommandQueue(WTFMove(queue)));
+    return adoptRef(*new WebMetalCommandQueue(WTFMove(queue)));
 }
 
-WebGPUCommandQueue::WebGPUCommandQueue(GPUCommandQueue&& queue)
+WebMetalCommandQueue::WebMetalCommandQueue(GPUCommandQueue&& queue)
     : m_queue { WTFMove(queue) }
 {
 }
 
-WebGPUCommandQueue::~WebGPUCommandQueue() = default;
+WebMetalCommandQueue::~WebMetalCommandQueue() = default;
 
-Ref<WebGPUCommandBuffer> WebGPUCommandQueue::createCommandBuffer()
+Ref<WebMetalCommandBuffer> WebMetalCommandQueue::createCommandBuffer()
 {
-    return WebGPUCommandBuffer::create(m_queue);
+    return WebMetalCommandBuffer::create(m_queue);
 }
 
 } // namespace WebCore
@@ -25,7 +25,7 @@
 
 #pragma once
 
-#if ENABLE(WEBGPU)
+#if ENABLE(WEBMETAL)
 
 #include "GPUCommandQueue.h"
 #include <wtf/Ref.h>
 
 namespace WebCore {
 
-class WebGPUCommandBuffer;
+class WebMetalCommandBuffer;
 
-class WebGPUCommandQueue : public RefCounted<WebGPUCommandQueue> {
+class WebMetalCommandQueue : public RefCounted<WebMetalCommandQueue> {
 public:
-    ~WebGPUCommandQueue();
-    static Ref<WebGPUCommandQueue> create(GPUCommandQueue&&);
+    ~WebMetalCommandQueue();
+    static Ref<WebMetalCommandQueue> create(GPUCommandQueue&&);
 
     String label() const { return m_queue.label(); }
     void setLabel(const String& label) { m_queue.setLabel(label); }
 
-    Ref<WebGPUCommandBuffer> createCommandBuffer();
+    Ref<WebMetalCommandBuffer> createCommandBuffer();
 
 private:
-    explicit WebGPUCommandQueue(GPUCommandQueue&&);
+    explicit WebMetalCommandQueue(GPUCommandQueue&&);
 
     GPUCommandQueue m_queue;
 };
  */
 
 [
-    Conditional=WEBGPU,
-    EnabledAtRuntime=WebGPU,
+    Conditional=WEBMETAL,
+    EnabledAtRuntime=WebMetal,
     ImplementationLacksVTable
-] interface WebGPUCommandQueue {
+] interface WebMetalCommandQueue {
 
     attribute DOMString label;
 
-    WebGPUCommandBuffer createCommandBuffer();
+    WebMetalCommandBuffer createCommandBuffer();
 
 };
  */
 
 #include "config.h"
-#include "WebGPUComputeCommandEncoder.h"
+#include "WebMetalComputeCommandEncoder.h"
 
-#if ENABLE(WEBGPU)
+#if ENABLE(WEBMETAL)
 
 #include "GPUCommandBuffer.h"
 #include "GPUComputeCommandEncoder.h"
 #include "GPUSize.h"
-#include "WebGPUBuffer.h"
-#include "WebGPUCommandBuffer.h"
-#include "WebGPUComputePipelineState.h"
+#include "WebMetalBuffer.h"
+#include "WebMetalCommandBuffer.h"
+#include "WebMetalComputePipelineState.h"
 
 namespace WebCore {
 
-static inline GPUSize GPUSizeMake(WebGPUSize size)
+static inline GPUSize GPUSizeMake(WebMetalSize size)
 {
     return { size.width, size.height, size.depth };
 }
 
-Ref<WebGPUComputeCommandEncoder> WebGPUComputeCommandEncoder::create(GPUComputeCommandEncoder&& encoder)
+Ref<WebMetalComputeCommandEncoder> WebMetalComputeCommandEncoder::create(GPUComputeCommandEncoder&& encoder)
 {
-    return adoptRef(*new WebGPUComputeCommandEncoder(WTFMove(encoder)));
+    return adoptRef(*new WebMetalComputeCommandEncoder(WTFMove(encoder)));
 }
     
-WebGPUComputeCommandEncoder::WebGPUComputeCommandEncoder(GPUComputeCommandEncoder&& encoder)
+WebMetalComputeCommandEncoder::WebMetalComputeCommandEncoder(GPUComputeCommandEncoder&& encoder)
     : m_encoder { WTFMove(encoder) }
 {
 }
 
-void WebGPUComputeCommandEncoder::setComputePipelineState(WebGPUComputePipelineState& pipelineState)
+void WebMetalComputeCommandEncoder::setComputePipelineState(WebMetalComputePipelineState& pipelineState)
 {
     m_encoder.setComputePipelineState(pipelineState.state());
 }
 
-void WebGPUComputeCommandEncoder::setBuffer(WebGPUBuffer& buffer, unsigned offset, unsigned index)
+void WebMetalComputeCommandEncoder::setBuffer(WebMetalBuffer& buffer, unsigned offset, unsigned index)
 {
     m_encoder.setBuffer(buffer.buffer(), offset, index);
 }
 
-void WebGPUComputeCommandEncoder::dispatch(WebGPUSize threadgroupsPerGrid, WebGPUSize threadsPerThreadgroup)
+void WebMetalComputeCommandEncoder::dispatch(WebMetalSize threadgroupsPerGrid, WebMetalSize threadsPerThreadgroup)
 {
     m_encoder.dispatch(GPUSizeMake(threadgroupsPerGrid), GPUSizeMake(threadsPerThreadgroup));
 }
 
-void WebGPUComputeCommandEncoder::endEncoding()
+void WebMetalComputeCommandEncoder::endEncoding()
 {
     m_encoder.endEncoding();
 }
 
 #pragma once
 
-#if ENABLE(WEBGPU)
+#if ENABLE(WEBMETAL)
 
 #include "GPUComputeCommandEncoder.h"
-#include "WebGPUSize.h"
+#include "WebMetalSize.h"
 #include <wtf/Ref.h>
 #include <wtf/RefCounted.h>
 
 namespace WebCore {
 
-class WebGPUBuffer;
-class WebGPUComputePipelineState;
+class WebMetalBuffer;
+class WebMetalComputePipelineState;
 
-class WebGPUComputeCommandEncoder : public RefCounted<WebGPUComputeCommandEncoder> {
+class WebMetalComputeCommandEncoder : public RefCounted<WebMetalComputeCommandEncoder> {
 public:
-    static Ref<WebGPUComputeCommandEncoder> create(GPUComputeCommandEncoder&&);
+    static Ref<WebMetalComputeCommandEncoder> create(GPUComputeCommandEncoder&&);
 
-    void setComputePipelineState(WebGPUComputePipelineState&);
-    void setBuffer(WebGPUBuffer&, unsigned, unsigned);
-    void dispatch(WebGPUSize, WebGPUSize);
+    void setComputePipelineState(WebMetalComputePipelineState&);
+    void setBuffer(WebMetalBuffer&, unsigned, unsigned);
+    void dispatch(WebMetalSize, WebMetalSize);
     void endEncoding();
 
 private:
-    explicit WebGPUComputeCommandEncoder(GPUComputeCommandEncoder&&);
+    explicit WebMetalComputeCommandEncoder(GPUComputeCommandEncoder&&);
 
     GPUComputeCommandEncoder m_encoder;
 };
  */
 
 [
-    Conditional=WEBGPU,
-    EnabledAtRuntime=WebGPU,
+    Conditional=WEBMETAL,
+    EnabledAtRuntime=WebMetal,
     ImplementationLacksVTable
-] interface WebGPUComputeCommandEncoder {
+] interface WebMetalComputeCommandEncoder {
 
-    void setComputePipelineState(WebGPUComputePipelineState pipelineState);
-    void setBuffer(WebGPUBuffer buffer, unsigned long offset, unsigned long index);
-    void dispatch(WebGPUSize threadgroupsPerGrid, WebGPUSize threadsPerThreadgroup);
+    void setComputePipelineState(WebMetalComputePipelineState pipelineState);
+    void setBuffer(WebMetalBuffer buffer, unsigned long offset, unsigned long index);
+    void dispatch(WebMetalSize threadgroupsPerGrid, WebMetalSize threadsPerThreadgroup);
 
     void endEncoding();
 
  */
 
 #include "config.h"
-#include "WebGPUComputePipelineState.h"
+#include "WebMetalComputePipelineState.h"
 
-#if ENABLE(WEBGPU)
+#if ENABLE(WEBMETAL)
 
 namespace WebCore {
 
-Ref<WebGPUComputePipelineState> WebGPUComputePipelineState::create(GPUComputePipelineState&& state)
+Ref<WebMetalComputePipelineState> WebMetalComputePipelineState::create(GPUComputePipelineState&& state)
 {
-    return adoptRef(*new WebGPUComputePipelineState(WTFMove(state)));
+    return adoptRef(*new WebMetalComputePipelineState(WTFMove(state)));
 }
 
-WebGPUComputePipelineState::WebGPUComputePipelineState(GPUComputePipelineState&& state)
+WebMetalComputePipelineState::WebMetalComputePipelineState(GPUComputePipelineState&& state)
     : m_state { WTFMove(state) }
 {
 }
@@ -25,7 +25,7 @@
 
 #pragma once
 
-#if ENABLE(WEBGPU)
+#if ENABLE(WEBMETAL)
 
 #include "GPUComputePipelineState.h"
 #include <wtf/Ref.h>
 
 namespace WebCore {
 
-class WebGPUFunction;
+class WebMetalFunction;
 
-class WebGPUComputePipelineState : public RefCounted<WebGPUComputePipelineState> {
+class WebMetalComputePipelineState : public RefCounted<WebMetalComputePipelineState> {
 public:
-    static Ref<WebGPUComputePipelineState> create(GPUComputePipelineState&&);
+    static Ref<WebMetalComputePipelineState> create(GPUComputePipelineState&&);
 
     GPUComputePipelineState& state() { return m_state; }
 
 private:
-    explicit WebGPUComputePipelineState(GPUComputePipelineState&&);
+    explicit WebMetalComputePipelineState(GPUComputePipelineState&&);
 
     GPUComputePipelineState m_state;
 };
@@ -24,8 +24,8 @@
  */
 
 [
-    Conditional=WEBGPU,
-    EnabledAtRuntime=WebGPU,
+    Conditional=WEBMETAL,
+    EnabledAtRuntime=WebMetal,
     ImplementationLacksVTable
-] interface WebGPUComputePipelineState {
+] interface WebMetalComputePipelineState {
 };
  */
 
 #include "config.h"
-#include "WebGPUDepthStencilDescriptor.h"
+#include "WebMetalDepthStencilDescriptor.h"
 
-#if ENABLE(WEBGPU)
+#if ENABLE(WEBMETAL)
 
 namespace WebCore {
 
-Ref<WebGPUDepthStencilDescriptor> WebGPUDepthStencilDescriptor::create()
+Ref<WebMetalDepthStencilDescriptor> WebMetalDepthStencilDescriptor::create()
 {
-    return adoptRef(*new WebGPUDepthStencilDescriptor);
+    return adoptRef(*new WebMetalDepthStencilDescriptor);
 }
 
-bool WebGPUDepthStencilDescriptor::depthWriteEnabled() const
+bool WebMetalDepthStencilDescriptor::depthWriteEnabled() const
 {
     return m_descriptor.depthWriteEnabled();
 }
 
-void WebGPUDepthStencilDescriptor::setDepthWriteEnabled(bool newDepthWriteEnabled)
+void WebMetalDepthStencilDescriptor::setDepthWriteEnabled(bool newDepthWriteEnabled)
 {
     m_descriptor.setDepthWriteEnabled(newDepthWriteEnabled);
 }
 
-WebGPUCompareFunction WebGPUDepthStencilDescriptor::depthCompareFunction() const
+WebMetalCompareFunction WebMetalDepthStencilDescriptor::depthCompareFunction() const
 {
     return m_depthCompareFunction;
 }
 
-void WebGPUDepthStencilDescriptor::setDepthCompareFunction(CompareFunction newDepthCompareFunction)
+void WebMetalDepthStencilDescriptor::setDepthCompareFunction(CompareFunction newDepthCompareFunction)
 {
     m_depthCompareFunction = newDepthCompareFunction;
     m_descriptor.setDepthCompareFunction(toGPUCompareFunction(m_depthCompareFunction));
 
 #pragma once
 
-#if ENABLE(WEBGPU)
+#if ENABLE(WEBMETAL)
 
 #include "GPUDepthStencilDescriptor.h"
-#include "WebGPUEnums.h"
+#include "WebMetalEnums.h"
 #include <wtf/Ref.h>
 #include <wtf/RefCounted.h>
 
 namespace WebCore {
 
-class WebGPUDepthStencilDescriptor : public RefCounted<WebGPUDepthStencilDescriptor> {
+class WebMetalDepthStencilDescriptor : public RefCounted<WebMetalDepthStencilDescriptor> {
 public:
-    static Ref<WebGPUDepthStencilDescriptor> create();
+    static Ref<WebMetalDepthStencilDescriptor> create();
 
     bool depthWriteEnabled() const;
     void setDepthWriteEnabled(bool);
 
-    using CompareFunction = WebGPUCompareFunction;
+    using CompareFunction = WebMetalCompareFunction;
     CompareFunction depthCompareFunction() const;
     void setDepthCompareFunction(CompareFunction);
 
     GPUDepthStencilDescriptor& descriptor() { return m_descriptor; }
 
 private:
-    WebGPUDepthStencilDescriptor() = default;
+    WebMetalDepthStencilDescriptor() = default;
 
     // FIXME: The default value of "Always" is defined both here and in the
     // GPUDepthStencilDescriptor class's implementation. Might be better to not
     // store the compare function separately here, translate it instead, and then
     // there would be no need for a default value here.
 
-    WebGPUCompareFunction m_depthCompareFunction { WebGPUCompareFunction::Always };
+    WebMetalCompareFunction m_depthCompareFunction { WebMetalCompareFunction::Always };
     GPUDepthStencilDescriptor m_descriptor;
 };
 
@@ -24,9 +24,9 @@
  */
 
 [
-    Conditional=WEBGPU,
-    EnabledAtRuntime=WebGPU
-] enum WebGPUCompareFunction {
+    Conditional=WEBMETAL,
+    EnabledAtRuntime=WebMetal
+] enum WebMetalCompareFunction {
     "never",
     "less",
     "equal",
 
 [
     Constructor,
-    Conditional=WEBGPU,
-    EnabledAtRuntime=WebGPU,
+    Conditional=WEBMETAL,
+    EnabledAtRuntime=WebMetal,
     ImplementationLacksVTable
-] interface WebGPUDepthStencilDescriptor {
+] interface WebMetalDepthStencilDescriptor {
 
-    attribute WebGPUCompareFunction depthCompareFunction;
+    attribute WebMetalCompareFunction depthCompareFunction;
     attribute boolean depthWriteEnabled;
 
 };
  */
 
 #include "config.h"
-#include "WebGPUDepthStencilState.h"
+#include "WebMetalDepthStencilState.h"
 
-#if ENABLE(WEBGPU)
+#if ENABLE(WEBMETAL)
 
-#include "WebGPUDepthStencilDescriptor.h"
+#include "WebMetalDepthStencilDescriptor.h"
 #include <wtf/text/WTFString.h>
 
 namespace WebCore {
 
-Ref<WebGPUDepthStencilState> WebGPUDepthStencilState::create(GPUDepthStencilState&& state)
+Ref<WebMetalDepthStencilState> WebMetalDepthStencilState::create(GPUDepthStencilState&& state)
 {
-    return adoptRef(*new WebGPUDepthStencilState(WTFMove(state)));
+    return adoptRef(*new WebMetalDepthStencilState(WTFMove(state)));
 }
 
-WebGPUDepthStencilState::WebGPUDepthStencilState(GPUDepthStencilState&& state)
+WebMetalDepthStencilState::WebMetalDepthStencilState(GPUDepthStencilState&& state)
     : m_state { WTFMove(state) }
 {
 }
 
-String WebGPUDepthStencilState::label() const
+String WebMetalDepthStencilState::label() const
 {
     return m_state.label();
 }
 
-void WebGPUDepthStencilState::setLabel(const String& label)
+void WebMetalDepthStencilState::setLabel(const String& label)
 {
     m_state.setLabel(label);
 }
@@ -25,7 +25,7 @@
 
 #pragma once
 
-#if ENABLE(WEBGPU)
+#if ENABLE(WEBMETAL)
 
 #include "GPUDepthStencilState.h"
 #include <wtf/Ref.h>
@@ -33,9 +33,9 @@
 
 namespace WebCore {
 
-class WebGPUDepthStencilState : public RefCounted<WebGPUDepthStencilState> {
+class WebMetalDepthStencilState : public RefCounted<WebMetalDepthStencilState> {
 public:
-    static Ref<WebGPUDepthStencilState> create(GPUDepthStencilState&&);
+    static Ref<WebMetalDepthStencilState> create(GPUDepthStencilState&&);
 
     String label() const;
     void setLabel(const String&);
@@ -43,7 +43,7 @@ public:
     GPUDepthStencilState& state() { return m_state; }
 
 private:
-    explicit WebGPUDepthStencilState(GPUDepthStencilState&&);
+    explicit WebMetalDepthStencilState(GPUDepthStencilState&&);
 
     GPUDepthStencilState m_state;
 };
  */
 
 [
-    Conditional=WEBGPU,
-    EnabledAtRuntime=WebGPU,
+    Conditional=WEBMETAL,
+    EnabledAtRuntime=WebMetal,
     ImplementationLacksVTable
-] interface WebGPURenderPipelineState {
+] interface WebMetalDepthStencilState {
 
     attribute DOMString label;
 
  */
 
 #include "config.h"
-#include "WebGPUDrawable.h"
+#include "WebMetalDrawable.h"
 
-#if ENABLE(WEBGPU)
+#if ENABLE(WEBMETAL)
 
 #include "GPUTexture.h"
-#include "WebGPUTexture.h"
+#include "WebMetalTexture.h"
 
 namespace WebCore {
 
-Ref<WebGPUDrawable> WebGPUDrawable::create(GPUDrawable&& drawable)
+Ref<WebMetalDrawable> WebMetalDrawable::create(GPUDrawable&& drawable)
 {
-    return adoptRef(*new WebGPUDrawable(WTFMove(drawable)));
+    return adoptRef(*new WebMetalDrawable(WTFMove(drawable)));
 }
 
-WebGPUDrawable::WebGPUDrawable(GPUDrawable&& drawable)
+WebMetalDrawable::WebMetalDrawable(GPUDrawable&& drawable)
     : m_drawable { WTFMove(drawable) }
-    , m_texture { WebGPUTexture::create(GPUTexture { m_drawable }) }
+    , m_texture { WebMetalTexture::create(GPUTexture { m_drawable }) }
 {
 }
 
-WebGPUDrawable::~WebGPUDrawable() = default;
+WebMetalDrawable::~WebMetalDrawable() = default;
 
 } // namespace WebCore
 
similarity index 82%
rename from Source/WebCore/html/canvas/WebGPUDrawable.h
rename to Source/WebCore/html/canvas/WebMetalDrawable.h
index c89f926..537ab5b 100644 (file)
@@ -25,7 +25,7 @@
 
 #pragma once
 
-#if ENABLE(WEBGPU)
+#if ENABLE(WEBMETAL)
 
 #include "GPUDrawable.h"
 #include <wtf/Ref.h>
 
 namespace WebCore {
 
-class WebGPUTexture;
+class WebMetalTexture;
 
-class WebGPUDrawable : public RefCounted<WebGPUDrawable> {
+class WebMetalDrawable : public RefCounted<WebMetalDrawable> {
 public:
-    ~WebGPUDrawable();
-    static Ref<WebGPUDrawable> create(GPUDrawable&&);
+    ~WebMetalDrawable();
+    static Ref<WebMetalDrawable> create(GPUDrawable&&);
 
     GPUDrawable& drawable() { return m_drawable; }
-    WebGPUTexture& texture() { return m_texture.get(); }
+    WebMetalTexture& texture() { return m_texture.get(); }
 
 private:
-    explicit WebGPUDrawable(GPUDrawable&&);
+    explicit WebMetalDrawable(GPUDrawable&&);
 
     GPUDrawable m_drawable;
-    Ref<WebGPUTexture> m_texture;
+    Ref<WebMetalTexture> m_texture;
 };
 
 } // namespace WebCore
  */
 
 [
-    Conditional=WEBGPU,
-    EnabledAtRuntime=WebGPU,
+    Conditional=WEBMETAL,
+    EnabledAtRuntime=WebMetal,
     ImplementationLacksVTable
-] interface WebGPUDrawable {
+] interface WebMetalDrawable {
 
-    readonly attribute WebGPUTexture texture; // FIXME: Only the framebuffer should have this.
+    readonly attribute WebMetalTexture texture; // FIXME: Only the framebuffer should have this.
 
 };
similarity index 64%
rename from Source/WebCore/html/canvas/WebGPUEnums.cpp
rename to Source/WebCore/html/canvas/WebMetalEnums.cpp
index c07bd28..6ad0a46 100644 (file)
  */
 
 #include "config.h"
-#include "WebGPUEnums.h"
+#include "WebMetalEnums.h"
 
-#if ENABLE(WEBGPU)
+#if ENABLE(WEBMETAL)
 
 #include "GPUEnums.h"
 #include <wtf/text/WTFString.h>
 
 namespace WebCore {
 
-std::optional<WebGPUCompareFunction> toWebGPUCompareFunction(const String& name)
+std::optional<WebMetalCompareFunction> toWebMetalCompareFunction(const String& name)
 {
     if (equalLettersIgnoringASCIICase(name, "never"))
-        return WebGPUCompareFunction::Never;
+        return WebMetalCompareFunction::Never;
     if (equalLettersIgnoringASCIICase(name, "less"))
-        return WebGPUCompareFunction::Less;
+        return WebMetalCompareFunction::Less;
     if (equalLettersIgnoringASCIICase(name, "equal"))
-        return WebGPUCompareFunction::Equal;
+        return WebMetalCompareFunction::Equal;
     if (equalLettersIgnoringASCIICase(name, "lessequal"))
-        return WebGPUCompareFunction::Lessequal;
+        return WebMetalCompareFunction::Lessequal;
     if (equalLettersIgnoringASCIICase(name, "greater"))
-        return WebGPUCompareFunction::Greater;
+        return WebMetalCompareFunction::Greater;
     if (equalLettersIgnoringASCIICase(name, "notequal"))
-        return WebGPUCompareFunction::Notequal;
+        return WebMetalCompareFunction::Notequal;
     if (equalLettersIgnoringASCIICase(name, "greaterequal"))
-        return WebGPUCompareFunction::Greaterequal;
+        return WebMetalCompareFunction::Greaterequal;
     if (equalLettersIgnoringASCIICase(name, "always"))
-        return WebGPUCompareFunction::Always;
+        return WebMetalCompareFunction::Always;
 
     ASSERT_NOT_REACHED();
     return std::nullopt;
 }
 
-String web3DCompareFunctionName(WebGPUCompareFunction value)
+String web3DCompareFunctionName(WebMetalCompareFunction value)
 {
-    if (value == WebGPUCompareFunction::Never)
+    if (value == WebMetalCompareFunction::Never)
         return "never"_s;
-    if (value == WebGPUCompareFunction::Less)
+    if (value == WebMetalCompareFunction::Less)
         return "less"_s;
-    if (value == WebGPUCompareFunction::Equal)
+    if (value == WebMetalCompareFunction::Equal)
         return "equal"_s;
-    if (value == WebGPUCompareFunction::Lessequal)
+    if (value == WebMetalCompareFunction::Lessequal)
         return "lessequal"_s;
-    if (value == WebGPUCompareFunction::Greater)
+    if (value == WebMetalCompareFunction::Greater)
         return "greater"_s;
-    if (value == WebGPUCompareFunction::Notequal)
+    if (value == WebMetalCompareFunction::Notequal)
         return "notequal"_s;
-    if (value == WebGPUCompareFunction::Greaterequal)
+    if (value == WebMetalCompareFunction::Greaterequal)
         return "greaterequal"_s;
-    if (value == WebGPUCompareFunction::Always)
+    if (value == WebMetalCompareFunction::Always)
         return "always"_s;
     
     ASSERT_NOT_REACHED();
     return emptyString();
 }
 
-GPUCompareFunction toGPUCompareFunction(const WebGPUCompareFunction value)
+GPUCompareFunction toGPUCompareFunction(const WebMetalCompareFunction value)
 {
-    if (value == WebGPUCompareFunction::Never)
+    if (value == WebMetalCompareFunction::Never)
         return GPUCompareFunction::Never;
-    if (value == WebGPUCompareFunction::Less)
+    if (value == WebMetalCompareFunction::Less)
         return GPUCompareFunction::Less;
-    if (value == WebGPUCompareFunction::Equal)
+    if (value == WebMetalCompareFunction::Equal)
         return GPUCompareFunction::Equal;
-    if (value == WebGPUCompareFunction::Lessequal)
+    if (value == WebMetalCompareFunction::Lessequal)
         return GPUCompareFunction::LessEqual;
-    if (value == WebGPUCompareFunction::Greater)
+    if (value == WebMetalCompareFunction::Greater)
         return GPUCompareFunction::Greater;
-    if (value == WebGPUCompareFunction::Notequal)
+    if (value == WebMetalCompareFunction::Notequal)
         return GPUCompareFunction::NotEqual;
-    if (value == WebGPUCompareFunction::Greaterequal)
+    if (value == WebMetalCompareFunction::Greaterequal)
         return GPUCompareFunction::GreaterEqual;
-    if (value == WebGPUCompareFunction::Always)
+    if (value == WebMetalCompareFunction::Always)
         return GPUCompareFunction::Always;
     
     ASSERT_NOT_REACHED();
similarity index 85%
rename from Source/WebCore/html/canvas/WebGPUEnums.h
rename to Source/WebCore/html/canvas/WebMetalEnums.h
index 43504e5..282c506 100644 (file)
@@ -25,7 +25,7 @@
 
 #pragma once
 
-#if ENABLE(WEBGPU)
+#if ENABLE(WEBMETAL)
 
 #include <wtf/Forward.h>
 #include <wtf/Optional.h>
@@ -34,7 +34,7 @@ namespace WebCore {
 
 enum class GPUCompareFunction;
 
-enum class WebGPUCompareFunction {
+enum class WebMetalCompareFunction {
     Never,
     Less,
     Equal,
@@ -45,9 +45,9 @@ enum class WebGPUCompareFunction {
     Always
 };
 
-std::optional<WebGPUCompareFunction> toWebGPUCompareFunction(const String&);
-String web3DCompareFunctionName(WebGPUCompareFunction);
-GPUCompareFunction toGPUCompareFunction(WebGPUCompareFunction);
+std::optional<WebMetalCompareFunction> toWebMetalCompareFunction(const String&);
+String web3DCompareFunctionName(WebMetalCompareFunction);
+GPUCompareFunction toGPUCompareFunction(WebMetalCompareFunction);
 
 } // namespace WebCore
 
similarity index 59%
rename from Source/WebCore/html/canvas/WebGPUEnums.idl
rename to Source/WebCore/html/canvas/WebMetalEnums.idl
index 721fa14..55ea451 100644 (file)
  */
 
 [
-    Conditional=WEBGPU,
-    EnabledAtRuntime=WebGPU
-] enum WebGPUPixelFormat {
+    Conditional=WEBMETAL,
+    EnabledAtRuntime=WebMetal
+] enum WebMetalPixelFormat {
     "BGRA8Unorm"
 };
 
 [
-    Conditional=WEBGPU,
-    EnabledAtRuntime=WebGPU
-] enum WebGPULoadAction {
+    Conditional=WEBMETAL,
+    EnabledAtRuntime=WebMetal
+] enum WebMetalLoadAction {
     "dontcare",
     "load",
     "clear"
 };
 
 [
-    Conditional=WEBGPU,
-    EnabledAtRuntime=WebGPU
-] enum WebGPUStoreAction {
+    Conditional=WEBMETAL,
+    EnabledAtRuntime=WebMetal
+] enum WebMetalStoreAction {
     "dontcare",
     "store",
     "multisampleresolve"
 };
 
 [
-    Conditional=WEBGPU,
-    EnabledAtRuntime=WebGPU
-] enum WebGPUPrimitiveType {
+    Conditional=WEBMETAL,
+    EnabledAtRuntime=WebMetal
+] enum WebMetalPrimitiveType {
     "point",
     "line",
     "linestrip",
 };
 
 [
-    Conditional=WEBGPU,
-    EnabledAtRuntime=WebGPU
-] enum WebGPUFunctionType {
+    Conditional=WEBMETAL,
+    EnabledAtRuntime=WebMetal
+] enum WebMetalFunctionType {
     "fragment",
     "vertex"
 };
 
 [
-    Conditional=WEBGPU,
-    EnabledAtRuntime=WebGPU
-] enum WebGPUStencilOperation {
+    Conditional=WEBMETAL,
+    EnabledAtRuntime=WebMetal
+] enum WebMetalStencilOperation {
     "keep",
     "zero",
     "replace",
@@ -82,9 +82,9 @@
 };
 
 [
-    Conditional=WEBGPU,
-    EnabledAtRuntime=WebGPU
-] enum WebGPUStatus {
+    Conditional=WEBMETAL,
+    EnabledAtRuntime=WebMetal
+] enum WebMetalStatus {
     "notenqueued",
     "enqueued",
     "committed",
@@ -94,9 +94,9 @@
 };
 
 [
-    Conditional=WEBGPU,
-    EnabledAtRuntime=WebGPU
-] enum WebGPUSamplerAddressMode {
+    Conditional=WEBMETAL,
+    EnabledAtRuntime=WebMetal
+] enum WebMetalSamplerAddressMode {
     "clamptoedge",
     "mirrorclamptoedge",
     "repeat",
 };
 
 [
-    Conditional=WEBGPU,
-    EnabledAtRuntime=WebGPU
-] enum WebGPUSamplerMinMagFilter {
+    Conditional=WEBMETAL,
+    EnabledAtRuntime=WebMetal
+] enum WebMetalSamplerMinMagFilter {
     "nearest",
     "linear"
 };
 
 [
-    Conditional=WEBGPU,
-    EnabledAtRuntime=WebGPU
-] enum WebGPUSamplerMipFilter {
+    Conditional=WEBMETAL,
+    EnabledAtRuntime=WebMetal
+] enum WebMetalSamplerMipFilter {
     "notmipmapped",
     "nearest",
     "linear"
 };
 
 [
-    Conditional=WEBGPU,
-    EnabledAtRuntime=WebGPU
-] enum WebGPUCullMode {
+    Conditional=WEBMETAL,
+    EnabledAtRuntime=WebMetal
+] enum WebMetalCullMode {
     "none",
     "front",
     "back"
 };
 
 [
-    Conditional=WEBGPU,
-    EnabledAtRuntime=WebGPU
-] enum WebGPUIndexType {
+    Conditional=WEBMETAL,
+    EnabledAtRuntime=WebMetal
+] enum WebMetalIndexType {
     "uint16",
     "uint32"
 };
 
 [
-    Conditional=WEBGPU,
-    EnabledAtRuntime=WebGPU
-] enum WebGPUVisibilityResultMode {
+    Conditional=WEBMETAL,
+    EnabledAtRuntime=WebMetal
+] enum WebMetalVisibilityResultMode {
     "disabled",
     "boolean",
     "counting"
 };
 
 [
-    Conditional=WEBGPU,
-    EnabledAtRuntime=WebGPU
-] enum WebGPUWinding {
+    Conditional=WEBMETAL,
+    EnabledAtRuntime=WebMetal
+] enum WebMetalWinding {
     "clockwise",
     "counterclockwise"
 };
 
 [
-    Conditional=WEBGPU,
-    EnabledAtRuntime=WebGPU
-] enum WebGPUDepthClipMode {
+    Conditional=WEBMETAL,
+    EnabledAtRuntime=WebMetal
+] enum WebMetalDepthClipMode {
     "clip",
     "clamp"
 };
 
 [
-    Conditional=WEBGPU,
-    EnabledAtRuntime=WebGPU
-] enum WebGPUTriangleFillMode {
+    Conditional=WEBMETAL,
+    EnabledAtRuntime=WebMetal
+] enum WebMetalTriangleFillMode {
     "fill",
     "lines"
 };
 
 [
-    Conditional=WEBGPU,
-    EnabledAtRuntime=WebGPU
-] enum WebGPUCPUCacheMode {
+    Conditional=WEBMETAL,
+    EnabledAtRuntime=WebMetal
+] enum WebMetalCPUCacheMode {
     "defaultcache",
     "writecombined"
 };
 
 [
-    Conditional=WEBGPU,
-    EnabledAtRuntime=WebGPU
-] enum WebGPUStorageMode {
+    Conditional=WEBMETAL,
+    EnabledAtRuntime=WebMetal
+] enum WebMetalStorageMode {
     "shared",
     "managed",
     "private"
 };
 
 [
-    Conditional=WEBGPU,
-    EnabledAtRuntime=WebGPU
-] enum WebGPUResourceOptions {
+    Conditional=WEBMETAL,
+    EnabledAtRuntime=WebMetal
+] enum WebMetalResourceOptions {
     "cpucachemodedefaultcache",
     "cpucachemodewritecombined",
     "storagemodeshared",
 };
 
 [
-    Conditional=WEBGPU,
-    EnabledAtRuntime=WebGPU
-] enum WebGPUTextureUsage {
+    Conditional=WEBMETAL,
+    EnabledAtRuntime=WebMetal
+] enum WebMetalTextureUsage {
     "unknown",
     "shaderread",
     "shaderwrite",
 };
 
 [
-    Conditional=WEBGPU,
-    EnabledAtRuntime=WebGPU
-] enum WebGPUBlendOperation {
+    Conditional=WEBMETAL,
+    EnabledAtRuntime=WebMetal
+] enum WebMetalBlendOperation {
     "add",
     "subtract",
     "reversesubtract",
 };
 
 [
-    Conditional=WEBGPU,
-    EnabledAtRuntime=WebGPU
-] enum WebGPUBlendFactor {
+    Conditional=WEBMETAL,
+    EnabledAtRuntime=WebMetal
+] enum WebMetalBlendFactor {
     "zero",
     "one",
     "sourcecolor",
 };
 
 [
-    Conditional=WEBGPU,
-    EnabledAtRuntime=WebGPU
-] enum WebGPUColorWriteMask {
+    Conditional=WEBMETAL,
+    EnabledAtRuntime=WebMetal
+] enum WebMetalColorWriteMask {
     "none",
     "red",
     "green",
 };
 
 [
-    Conditional=WEBGPU,
-    EnabledAtRuntime=WebGPU
-] enum WebGPUMultisampleDepthResolveFilter {
+    Conditional=WEBMETAL,
+    EnabledAtRuntime=WebMetal
+] enum WebMetalMultisampleDepthResolveFilter {
     "sample0",
     "min",
     "max"
 };
 
 [
-    Conditional=WEBGPU,
-    EnabledAtRuntime=WebGPU
-] enum WebGPUFeatureSet {
+    Conditional=WEBMETAL,
+    EnabledAtRuntime=WebMetal
+] enum WebMetalFeatureSet {
     "level1",
     "level2"
 };
  */
 
 #include "config.h"
-#include "WebGPUFunction.h"
+#include "WebMetalFunction.h"
 
-#if ENABLE(WEBGPU)
+#if ENABLE(WEBMETAL)
 
-#include "WebGPULibrary.h"
+#include "WebMetalLibrary.h"
 
 namespace WebCore {
 
-Ref<WebGPUFunction> WebGPUFunction::create(GPUFunction&& function)
+Ref<WebMetalFunction> WebMetalFunction::create(GPUFunction&& function)
 {
-    return adoptRef(*new WebGPUFunction(WTFMove(function)));
+    return adoptRef(*new WebMetalFunction(WTFMove(function)));
 }
 
-WebGPUFunction::WebGPUFunction(GPUFunction&& function)
+WebMetalFunction::WebMetalFunction(GPUFunction&& function)
     : m_function { WTFMove(function) }
 {
 }
similarity index 90%
rename from Source/WebCore/html/canvas/WebGPUFunction.h
rename to Source/WebCore/html/canvas/WebMetalFunction.h
index 82d4ee8..2ba692c 100644 (file)
@@ -25,7 +25,7 @@
 
 #pragma once
 
-#if ENABLE(WEBGPU)
+#if ENABLE(WEBMETAL)
 
 #include "GPUFunction.h"
 #include <wtf/Ref.h>
 
 namespace WebCore {
 
-class WebGPUFunction : public RefCounted<WebGPUFunction> {
+class WebMetalFunction : public RefCounted<WebMetalFunction> {
 public:
-    static Ref<WebGPUFunction> create(GPUFunction&&);
+    static Ref<WebMetalFunction> create(GPUFunction&&);
 
     String name() const { return m_function.name(); }
     const GPUFunction& function() const { return m_function; }
 
 private:
-    explicit WebGPUFunction(GPUFunction&&);
+    explicit WebMetalFunction(GPUFunction&&);
 
     GPUFunction m_function;
 };
  */
 
 [
-    Conditional=WEBGPU,
-    EnabledAtRuntime=WebGPU,
+    Conditional=WEBMETAL,
+    EnabledAtRuntime=WebMetal,
     ImplementationLacksVTable
-] interface WebGPUFunction {
+] interface WebMetalFunction {
 
     readonly attribute DOMString name;
 
  */
 
 #include "config.h"
-#include "WebGPULibrary.h"
+#include "WebMetalLibrary.h"
 
-#if ENABLE(WEBGPU)
+#if ENABLE(WEBMETAL)
 
-#include "WebGPUFunction.h"
+#include "WebMetalFunction.h"
 
 namespace WebCore {
 
-Ref<WebGPULibrary> WebGPULibrary::create(GPULibrary&& library, const String& sourceCode)
+Ref<WebMetalLibrary> WebMetalLibrary::create(GPULibrary&& library, const String& sourceCode)
 {
-    return adoptRef(*new WebGPULibrary(WTFMove(library), sourceCode));
+    return adoptRef(*new WebMetalLibrary(WTFMove(library), sourceCode));
 }
 
-WebGPULibrary::WebGPULibrary(GPULibrary&& library, const String& sourceCode)
+WebMetalLibrary::WebMetalLibrary(GPULibrary&& library, const String& sourceCode)
     : m_sourceCode { sourceCode }
     , m_library { WTFMove(library) }
 {
 }
 
-Vector<String> WebGPULibrary::functionNames() const
+Vector<String> WebMetalLibrary::functionNames() const
 {
     return m_library.functionNames();
 }
 
-RefPtr<WebGPUFunction> WebGPULibrary::functionWithName(const String& name) const
+RefPtr<WebMetalFunction> WebMetalLibrary::functionWithName(const String& name) const
 {
     GPUFunction function { m_library, name };
     if (!function)
         return nullptr;
-    return WebGPUFunction::create(WTFMove(function));
+    return WebMetalFunction::create(WTFMove(function));
 }
 
 } // namespace WebCore
similarity index 84%
rename from Source/WebCore/html/canvas/WebGPULibrary.h
rename to Source/WebCore/html/canvas/WebMetalLibrary.h
index 8292f3b..e8e11d9 100644 (file)
@@ -25,7 +25,7 @@
 
 #pragma once
 
-#if ENABLE(WEBGPU)
+#if ENABLE(WEBMETAL)
 
 #include "GPULibrary.h"
 #include <wtf/Ref.h>
 
 namespace WebCore {
 
-class WebGPUFunction;
+class WebMetalFunction;
 
-class WebGPULibrary : public RefCounted<WebGPULibrary> {
+class WebMetalLibrary : public RefCounted<WebMetalLibrary> {
 public:
-    static Ref<WebGPULibrary> create(GPULibrary&&, const String& sourceCode);
+    static Ref<WebMetalLibrary> create(GPULibrary&&, const String& sourceCode);
 
     const String& sourceCode() const { return m_sourceCode; }
 
@@ -46,10 +46,10 @@ public:
 
     Vector<String> functionNames() const;
 
-    RefPtr<WebGPUFunction> functionWithName(const String&) const;
+    RefPtr<WebMetalFunction> functionWithName(const String&) const;
 
 private:
-    WebGPULibrary(GPULibrary&&, const String& sourceCode);
+    WebMetalLibrary(GPULibrary&&, const String& sourceCode);
 
     String m_sourceCode;
     GPULibrary m_library;
  */
 
 [
-    Conditional=WEBGPU,
-    EnabledAtRuntime=WebGPU,
+    Conditional=WEBMETAL,
+    EnabledAtRuntime=WebMetal,
     ImplementationLacksVTable
-] interface WebGPULibrary {
+] interface WebMetalLibrary {
 
     readonly attribute DOMString sourceCode;
     attribute DOMString label;
     readonly attribute sequence<DOMString> functionNames;
 
-    WebGPUFunction? functionWithName(DOMString name);
+    WebMetalFunction? functionWithName(DOMString name);
 
 };
  */
 
 #include "config.h"
-#include "WebGPURenderCommandEncoder.h"
+#include "WebMetalRenderCommandEncoder.h"
 
-#if ENABLE(WEBGPU)
+#if ENABLE(WEBMETAL)
 
 #include "GPUCommandBuffer.h"
 #include "GPURenderPassDescriptor.h"
-#include "WebGPUBuffer.h"
-#include "WebGPUCommandBuffer.h"
-#include "WebGPUDepthStencilState.h"
-#include "WebGPURenderPassDescriptor.h"
-#include "WebGPURenderPipelineState.h"
+#include "WebMetalBuffer.h"
+#include "WebMetalCommandBuffer.h"
+#include "WebMetalDepthStencilState.h"
+#include "WebMetalRenderPassDescriptor.h"
+#include "WebMetalRenderPipelineState.h"
 
 namespace WebCore {
 
-Ref<WebGPURenderCommandEncoder> WebGPURenderCommandEncoder::create(GPURenderCommandEncoder&& encoder)
+Ref<WebMetalRenderCommandEncoder> WebMetalRenderCommandEncoder::create(GPURenderCommandEncoder&& encoder)
 {
-    return adoptRef(*new WebGPURenderCommandEncoder(WTFMove(encoder)));
+    return adoptRef(*new WebMetalRenderCommandEncoder(WTFMove(encoder)));
 }
 
-WebGPURenderCommandEncoder::WebGPURenderCommandEncoder(GPURenderCommandEncoder&& encoder)
+WebMetalRenderCommandEncoder::WebMetalRenderCommandEncoder(GPURenderCommandEncoder&& encoder)
     : m_encoder { WTFMove(encoder) }
 {
 }
 
-WebGPURenderCommandEncoder::~WebGPURenderCommandEncoder() = default;
+WebMetalRenderCommandEncoder::~WebMetalRenderCommandEncoder() = default;
 
-void WebGPURenderCommandEncoder::setRenderPipelineState(WebGPURenderPipelineState& pipelineState)
+void WebMetalRenderCommandEncoder::setRenderPipelineState(WebMetalRenderPipelineState& pipelineState)
 {
     m_encoder.setRenderPipelineState(pipelineState.state());
 }
 
-void WebGPURenderCommandEncoder::setDepthStencilState(WebGPUDepthStencilState& depthStencilState)
+void WebMetalRenderCommandEncoder::setDepthStencilState(WebMetalDepthStencilState& depthStencilState)
 {
     m_encoder.setDepthStencilState(depthStencilState.state());
 }
 
-void WebGPURenderCommandEncoder::setVertexBuffer(WebGPUBuffer& buffer, unsigned offset, unsigned index)
+void WebMetalRenderCommandEncoder::setVertexBuffer(WebMetalBuffer& buffer, unsigned offset, unsigned index)
 {
     m_encoder.setVertexBuffer(buffer.buffer(), offset, index);
 }
 
-void WebGPURenderCommandEncoder::setFragmentBuffer(WebGPUBuffer& buffer, unsigned offset, unsigned index)
+void WebMetalRenderCommandEncoder::setFragmentBuffer(WebMetalBuffer& buffer, unsigned offset, unsigned index)
 {
     m_encoder.setFragmentBuffer(buffer.buffer(), offset, index);
 }
 
-void WebGPURenderCommandEncoder::drawPrimitives(unsigned type, unsigned start, unsigned count)
+void WebMetalRenderCommandEncoder::drawPrimitives(unsigned type, unsigned start, unsigned count)
 {
     m_encoder.drawPrimitives(type, start, count);
 }
 
-void WebGPURenderCommandEncoder::endEncoding()
+void WebMetalRenderCommandEncoder::endEncoding()
 {
     return m_encoder.endEncoding();
 }
@@ -25,7 +25,7 @@
 
 #pragma once
 
-#if ENABLE(WEBGPU)
+#if ENABLE(WEBMETAL)
 
 #include "GPURenderCommandEncoder.h"
 #include <wtf/Ref.h>
 
 namespace WebCore {
 
-class WebGPUBuffer;
-class WebGPUDepthStencilState;
-class WebGPURenderPipelineState;
+class WebMetalBuffer;
+class WebMetalDepthStencilState;
+class WebMetalRenderPipelineState;
 
-class WebGPURenderCommandEncoder : public RefCounted<WebGPURenderCommandEncoder> {
+class WebMetalRenderCommandEncoder : public RefCounted<WebMetalRenderCommandEncoder> {
 public:
-    ~WebGPURenderCommandEncoder();
-    static Ref<WebGPURenderCommandEncoder> create(GPURenderCommandEncoder&&);
+    ~WebMetalRenderCommandEncoder();
+    static Ref<WebMetalRenderCommandEncoder> create(GPURenderCommandEncoder&&);
 
-    void setRenderPipelineState(WebGPURenderPipelineState&);
-    void setDepthStencilState(WebGPUDepthStencilState&);
-    void setVertexBuffer(WebGPUBuffer&, unsigned offset, unsigned index);
-    void setFragmentBuffer(WebGPUBuffer&, unsigned offset, unsigned index);
+    void setRenderPipelineState(WebMetalRenderPipelineState&);
+    void setDepthStencilState(WebMetalDepthStencilState&);
+    void setVertexBuffer(WebMetalBuffer&, unsigned offset, unsigned index);
+    void setFragmentBuffer(WebMetalBuffer&, unsigned offset, unsigned index);
     void drawPrimitives(unsigned type, unsigned start, unsigned count);
     void endEncoding();
 
     GPURenderCommandEncoder& encoder() { return m_encoder; }
 
 private:
-    explicit WebGPURenderCommandEncoder(GPURenderCommandEncoder&&);
+    explicit WebMetalRenderCommandEncoder(GPURenderCommandEncoder&&);
 
     GPURenderCommandEncoder m_encoder;
 };
  */
 
 [
-    Conditional=WEBGPU,
-    EnabledAtRuntime=WebGPU,
+    Conditional=WEBMETAL,
+    EnabledAtRuntime=WebMetal,
     ImplementationLacksVTable
-] interface WebGPURenderCommandEncoder {
+] interface WebMetalRenderCommandEncoder {
 
-    void setRenderPipelineState(WebGPURenderPipelineState pipelineState);
-    void setDepthStencilState(WebGPUDepthStencilState depthStencilState);
-    void setVertexBuffer(WebGPUBuffer buffer, unsigned long offset, unsigned long index);
-    void setFragmentBuffer(WebGPUBuffer buffer, unsigned long offset, unsigned long index);
+    void setRenderPipelineState(WebMetalRenderPipelineState pipelineState);
+    void setDepthStencilState(WebMetalDepthStencilState depthStencilState);
+    void setVertexBuffer(WebMetalBuffer buffer, unsigned long offset, unsigned long index);
+    void setFragmentBuffer(WebMetalBuffer buffer, unsigned long offset, unsigned long index);
     void drawPrimitives(unsigned long type, unsigned long start, unsigned long count);
 
     void endEncoding();
  */
 
 #include "config.h"
-#include "WebGPURenderPassAttachmentDescriptor.h"
+#include "WebMetalRenderPassAttachmentDescriptor.h"
 
-#if ENABLE(WEBGPU)
+#if ENABLE(WEBMETAL)
 
 #include "GPURenderPassAttachmentDescriptor.h"
 #include "GPUTexture.h"
-#include "WebGPUTexture.h"
+#include "WebMetalTexture.h"
 
 namespace WebCore {
 
-WebGPURenderPassAttachmentDescriptor::WebGPURenderPassAttachmentDescriptor()
+WebMetalRenderPassAttachmentDescriptor::WebMetalRenderPassAttachmentDescriptor()
 {
 }
 
-WebGPURenderPassAttachmentDescriptor::~WebGPURenderPassAttachmentDescriptor() = default;
+WebMetalRenderPassAttachmentDescriptor::~WebMetalRenderPassAttachmentDescriptor() = default;
 
-unsigned WebGPURenderPassAttachmentDescriptor::loadAction() const
+unsigned WebMetalRenderPassAttachmentDescriptor::loadAction() const
 {
     return descriptor().loadAction();
 }
 
-void WebGPURenderPassAttachmentDescriptor::setLoadAction(unsigned newLoadAction)
+void WebMetalRenderPassAttachmentDescriptor::setLoadAction(unsigned newLoadAction)
 {
     descriptor().setLoadAction(newLoadAction);
 }
 
-unsigned WebGPURenderPassAttachmentDescriptor::storeAction() const
+unsigned WebMetalRenderPassAttachmentDescriptor::storeAction() const
 {
     return descriptor().storeAction();
 }
 
-void WebGPURenderPassAttachmentDescriptor::setStoreAction(unsigned newStoreAction)
+void WebMetalRenderPassAttachmentDescriptor::setStoreAction(unsigned newStoreAction)
 {
     descriptor().setStoreAction(newStoreAction);
 }
 
-WebGPUTexture* WebGPURenderPassAttachmentDescriptor::texture() const
+WebMetalTexture* WebMetalRenderPassAttachmentDescriptor::texture() const
 {
     return m_texture.get();
 }
 
-void WebGPURenderPassAttachmentDescriptor::setTexture(RefPtr<WebGPUTexture>&& newTexture)
+void WebMetalRenderPassAttachmentDescriptor::setTexture(RefPtr<WebMetalTexture>&& newTexture)
 {
     // FIXME: Why can't we set this to null?
     if (!newTexture)
@@ -25,7 +25,7 @@
 
 #pragma once
 
-#if ENABLE(WEBGPU)
+#if ENABLE(WEBMETAL)
 
 #include <wtf/Ref.h>
 #include <wtf/RefCounted.h>
 namespace WebCore {
 
 class GPURenderPassAttachmentDescriptor;
-class WebGPUTexture;
+class WebMetalTexture;
 
-class WebGPURenderPassAttachmentDescriptor : public RefCounted<WebGPURenderPassAttachmentDescriptor> {
+class WebMetalRenderPassAttachmentDescriptor : public RefCounted<WebMetalRenderPassAttachmentDescriptor> {
 public:
-    virtual ~WebGPURenderPassAttachmentDescriptor();
+    virtual ~WebMetalRenderPassAttachmentDescriptor();
 
     unsigned loadAction() const;
     void setLoadAction(unsigned);
@@ -45,18 +45,18 @@ public:
     unsigned storeAction() const;
     void setStoreAction(unsigned);
 
-    WebGPUTexture* texture() const;
-    void setTexture(RefPtr<WebGPUTexture>&&);
+    WebMetalTexture* texture() const;
+    void setTexture(RefPtr<WebMetalTexture>&&);
 
     virtual bool isColorAttachmentDescriptor() const = 0;
 
 protected:
-    WebGPURenderPassAttachmentDescriptor();
+    WebMetalRenderPassAttachmentDescriptor();
 
 private:
     virtual const GPURenderPassAttachmentDescriptor& descriptor() const = 0;
 
-    RefPtr<WebGPUTexture> m_texture;
+    RefPtr<WebMetalTexture> m_texture;
 };
 
 } // namespace WebCore
  */
 
 [
-    Conditional=WEBGPU,
-    EnabledAtRuntime=WebGPU,
+    Conditional=WEBMETAL,
+    EnabledAtRuntime=WebMetal,
     CustomToJSObject
 ]
-interface WebGPURenderPassAttachmentDescriptor {
+interface WebMetalRenderPassAttachmentDescriptor {
 
-    attribute WebGPUTexture? texture;
+    attribute WebMetalTexture? texture;
 
-    attribute unsigned long loadAction; // should be WebGPULoadAction
-    attribute unsigned long storeAction; // should be WebGPUStoreAction
+    attribute unsigned long loadAction; // should be WebMetalLoadAction
+    attribute unsigned long storeAction; // should be WebMetalStoreAction
 
 };
  */
 
 #include "config.h"
-#include "WebGPURenderPassColorAttachmentDescriptor.h"
+#include "WebMetalRenderPassColorAttachmentDescriptor.h"
 
-#if ENABLE(WEBGPU)
+#if ENABLE(WEBMETAL)
 
 #include "GPUTexture.h"
-#include "WebGPUTexture.h"
+#include "WebMetalTexture.h"
 #include <wtf/Vector.h>
 
 namespace WebCore {
 
-Ref<WebGPURenderPassColorAttachmentDescriptor> WebGPURenderPassColorAttachmentDescriptor::create(GPURenderPassColorAttachmentDescriptor&& descriptor)
+Ref<WebMetalRenderPassColorAttachmentDescriptor> WebMetalRenderPassColorAttachmentDescriptor::create(GPURenderPassColorAttachmentDescriptor&& descriptor)
 {
-    return adoptRef(*new WebGPURenderPassColorAttachmentDescriptor(WTFMove(descriptor)));
+    return adoptRef(*new WebMetalRenderPassColorAttachmentDescriptor(WTFMove(descriptor)));
 }
 
-WebGPURenderPassColorAttachmentDescriptor::WebGPURenderPassColorAttachmentDescriptor(GPURenderPassColorAttachmentDescriptor&& descriptor)
+WebMetalRenderPassColorAttachmentDescriptor::WebMetalRenderPassColorAttachmentDescriptor(GPURenderPassColorAttachmentDescriptor&& descriptor)
     : m_descriptor { WTFMove(descriptor) }
 {
 }
 
-WebGPURenderPassColorAttachmentDescriptor::~WebGPURenderPassColorAttachmentDescriptor() = default;
+WebMetalRenderPassColorAttachmentDescriptor::~WebMetalRenderPassColorAttachmentDescriptor() = default;
 
-const GPURenderPassAttachmentDescriptor& WebGPURenderPassColorAttachmentDescriptor::descriptor() const
+const GPURenderPassAttachmentDescriptor& WebMetalRenderPassColorAttachmentDescriptor::descriptor() const
 {
     return m_descriptor;
 }
 
-Vector<float> WebGPURenderPassColorAttachmentDescriptor::clearColor() const
+Vector<float> WebMetalRenderPassColorAttachmentDescriptor::clearColor() const
 {
     return m_descriptor.clearColor();
 }
 
-void WebGPURenderPassColorAttachmentDescriptor::setClearColor(const Vector<float>& newClearColor)
+void WebMetalRenderPassColorAttachmentDescriptor::setClearColor(const Vector<float>& newClearColor)
 {
     m_descriptor.setClearColor(newClearColor);
 }
 
 #pragma once
 
-#if ENABLE(WEBGPU)
+#if ENABLE(WEBMETAL)
 
 #include "GPURenderPassColorAttachmentDescriptor.h"
-#include "WebGPURenderPassAttachmentDescriptor.h"
+#include "WebMetalRenderPassAttachmentDescriptor.h"
 
 namespace WebCore {
 
-class WebGPURenderPassColorAttachmentDescriptor final : public WebGPURenderPassAttachmentDescriptor {
+class WebMetalRenderPassColorAttachmentDescriptor final : public WebMetalRenderPassAttachmentDescriptor {
 public:
-    virtual ~WebGPURenderPassColorAttachmentDescriptor();
-    static Ref<WebGPURenderPassColorAttachmentDescriptor> create(GPURenderPassColorAttachmentDescriptor&&);
+    virtual ~WebMetalRenderPassColorAttachmentDescriptor();
+    static Ref<WebMetalRenderPassColorAttachmentDescriptor> create(GPURenderPassColorAttachmentDescriptor&&);
 
     Vector<float> clearColor() const;
     void setClearColor(const Vector<float>&);
 
 private:
-    explicit WebGPURenderPassColorAttachmentDescriptor(GPURenderPassColorAttachmentDescriptor&&);
+    explicit WebMetalRenderPassColorAttachmentDescriptor(GPURenderPassColorAttachmentDescriptor&&);
 
     const GPURenderPassAttachmentDescriptor& descriptor() const final;
     bool isColorAttachmentDescriptor() const final { return true; }
@@ -24,9 +24,9 @@
  */
 
 [
-    Conditional=WEBGPU,
-    EnabledAtRuntime=WebGPU
-] interface WebGPURenderPassColorAttachmentDescriptor : WebGPURenderPassAttachmentDescriptor {
+    Conditional=WEBMETAL,
+    EnabledAtRuntime=WebMetal
+] interface WebMetalRenderPassColorAttachmentDescriptor : WebMetalRenderPassAttachmentDescriptor {
 
     attribute sequence<float> clearColor;
 
  */
 
 #include "config.h"
-#include "WebGPURenderPassDepthAttachmentDescriptor.h"
+#include "WebMetalRenderPassDepthAttachmentDescriptor.h"
 
-#if ENABLE(WEBGPU)
+#if ENABLE(WEBMETAL)
 
-#include "WebGPUTexture.h"
+#include "WebMetalTexture.h"
 
 namespace WebCore {
 
-Ref<WebGPURenderPassDepthAttachmentDescriptor> WebGPURenderPassDepthAttachmentDescriptor::create(GPURenderPassDepthAttachmentDescriptor&& descriptor)
+Ref<WebMetalRenderPassDepthAttachmentDescriptor> WebMetalRenderPassDepthAttachmentDescriptor::create(GPURenderPassDepthAttachmentDescriptor&& descriptor)
 {
-    return adoptRef(*new WebGPURenderPassDepthAttachmentDescriptor(WTFMove(descriptor)));
+    return adoptRef(*new WebMetalRenderPassDepthAttachmentDescriptor(WTFMove(descriptor)));
 }
 
-WebGPURenderPassDepthAttachmentDescriptor::WebGPURenderPassDepthAttachmentDescriptor(GPURenderPassDepthAttachmentDescriptor&& descriptor)
+WebMetalRenderPassDepthAttachmentDescriptor::WebMetalRenderPassDepthAttachmentDescriptor(GPURenderPassDepthAttachmentDescriptor&& descriptor)
     : m_descriptor { WTFMove(descriptor) }
 {
 }
 
-WebGPURenderPassDepthAttachmentDescriptor::~WebGPURenderPassDepthAttachmentDescriptor() = default;
+WebMetalRenderPassDepthAttachmentDescriptor::~WebMetalRenderPassDepthAttachmentDescriptor() = default;
 
-double WebGPURenderPassDepthAttachmentDescriptor::clearDepth() const
+double WebMetalRenderPassDepthAttachmentDescriptor::clearDepth() const
 {
     return m_descriptor.clearDepth();
 }
 
-void WebGPURenderPassDepthAttachmentDescriptor::setClearDepth(double newClearDepth)
+void WebMetalRenderPassDepthAttachmentDescriptor::setClearDepth(double newClearDepth)
 {
     m_descriptor.setClearDepth(newClearDepth);
 }
 
-const GPURenderPassAttachmentDescriptor& WebGPURenderPassDepthAttachmentDescriptor::descriptor() const
+const GPURenderPassAttachmentDescriptor& WebMetalRenderPassDepthAttachmentDescriptor::descriptor() const
 {
     return m_descriptor;
 }
 
 #pragma once
 
-#if ENABLE(WEBGPU)
+#if ENABLE(WEBMETAL)
 
 #include "GPURenderPassDepthAttachmentDescriptor.h"
-#include "WebGPURenderPassAttachmentDescriptor.h"
+#include "WebMetalRenderPassAttachmentDescriptor.h"
 
 namespace WebCore {
 
-class WebGPURenderPassDepthAttachmentDescriptor final : public WebGPURenderPassAttachmentDescriptor {
+class WebMetalRenderPassDepthAttachmentDescriptor final : public WebMetalRenderPassAttachmentDescriptor {
 public:
-    virtual ~WebGPURenderPassDepthAttachmentDescriptor();
-    static Ref<WebGPURenderPassDepthAttachmentDescriptor> create(GPURenderPassDepthAttachmentDescriptor&&);
+    virtual ~WebMetalRenderPassDepthAttachmentDescriptor();
+    static Ref<WebMetalRenderPassDepthAttachmentDescriptor> create(GPURenderPassDepthAttachmentDescriptor&&);
 
     double clearDepth() const;
     void setClearDepth(double);
 
 private:
-    explicit WebGPURenderPassDepthAttachmentDescriptor(GPURenderPassDepthAttachmentDescriptor&&);
+    explicit WebMetalRenderPassDepthAttachmentDescriptor(GPURenderPassDepthAttachmentDescriptor&&);
 
     const GPURenderPassAttachmentDescriptor& descriptor() const final;
     bool isColorAttachmentDescriptor() const final { return false; }
@@ -24,9 +24,9 @@
  */
 
 [
-    Conditional=WEBGPU,
-    EnabledAtRuntime=WebGPU
-] interface WebGPURenderPassDepthAttachmentDescriptor : WebGPURenderPassAttachmentDescriptor {
+    Conditional=WEBMETAL,
+    EnabledAtRuntime=WebMetal
+] interface WebMetalRenderPassDepthAttachmentDescriptor : WebMetalRenderPassAttachmentDescriptor {
 
     attribute unrestricted double clearDepth;
 
  */
 
 #include "config.h"
-#include "WebGPURenderPassDescriptor.h"
+#include "WebMetalRenderPassDescriptor.h"
 
-#if ENABLE(WEBGPU)
+#if ENABLE(WEBMETAL)
 
 namespace WebCore {
 
-Ref<WebGPURenderPassDescriptor> WebGPURenderPassDescriptor::create()
+Ref<WebMetalRenderPassDescriptor> WebMetalRenderPassDescriptor::create()
 {
-    return adoptRef(*new WebGPURenderPassDescriptor);
+    return adoptRef(*new WebMetalRenderPassDescriptor);
 }
 
-WebGPURenderPassDescriptor::WebGPURenderPassDescriptor() = default;
+WebMetalRenderPassDescriptor::WebMetalRenderPassDescriptor() = default;
 
-WebGPURenderPassDescriptor::~WebGPURenderPassDescriptor() = default;
+WebMetalRenderPassDescriptor::~WebMetalRenderPassDescriptor() = default;
 
-WebGPURenderPassDepthAttachmentDescriptor& WebGPURenderPassDescriptor::depthAttachment()
+WebMetalRenderPassDepthAttachmentDescriptor& WebMetalRenderPassDescriptor::depthAttachment()
 {
     if (!m_depthAttachment)
-        m_depthAttachment = WebGPURenderPassDepthAttachmentDescriptor::create(m_descriptor.depthAttachment());
+        m_depthAttachment = WebMetalRenderPassDepthAttachmentDescriptor::create(m_descriptor.depthAttachment());
     return *m_depthAttachment;
 }
 
-const Vector<RefPtr<WebGPURenderPassColorAttachmentDescriptor>>& WebGPURenderPassDescriptor::colorAttachments()
+const Vector<RefPtr<WebMetalRenderPassColorAttachmentDescriptor>>& WebMetalRenderPassDescriptor::colorAttachments()
 {
     if (m_colorAttachments.isEmpty()) {
         auto attachments = m_descriptor.colorAttachments();
         ASSERT(!attachments.isEmpty());
         m_colorAttachments.reserveInitialCapacity(attachments.size());
         for (auto& attachment : attachments)
-            m_colorAttachments.uncheckedAppend(WebGPURenderPassColorAttachmentDescriptor::create(WTFMove(attachment)));
+            m_colorAttachments.uncheckedAppend(WebMetalRenderPassColorAttachmentDescriptor::create(WTFMove(attachment)));
     }
     return m_colorAttachments;
 }
 
 #pragma once
 
-#if ENABLE(WEBGPU)
+#if ENABLE(WEBMETAL)
 
 #include "GPURenderPassDescriptor.h"
-#include "WebGPURenderPassColorAttachmentDescriptor.h"
-#include "WebGPURenderPassDepthAttachmentDescriptor.h"
+#include "WebMetalRenderPassColorAttachmentDescriptor.h"
+#include "WebMetalRenderPassDepthAttachmentDescriptor.h"
 #include <wtf/Ref.h>
 #include <wtf/RefCounted.h>
 #include <wtf/Vector.h>
 
 namespace WebCore {
 
-class WebGPURenderPassDescriptor : public RefCounted<WebGPURenderPassDescriptor> {
+class WebMetalRenderPassDescriptor : public RefCounted<WebMetalRenderPassDescriptor> {
 public:
-    ~WebGPURenderPassDescriptor();
-    static Ref<WebGPURenderPassDescriptor> create();
+    ~WebMetalRenderPassDescriptor();
+    static Ref<WebMetalRenderPassDescriptor> create();
 
-    WebGPURenderPassDepthAttachmentDescriptor& depthAttachment();
-    const Vector<RefPtr<WebGPURenderPassColorAttachmentDescriptor>>& colorAttachments();
+    WebMetalRenderPassDepthAttachmentDescriptor& depthAttachment();
+    const Vector<RefPtr<WebMetalRenderPassColorAttachmentDescriptor>>& colorAttachments();
 
     const GPURenderPassDescriptor& descriptor() const { return m_descriptor; }
 
 private:
-    WebGPURenderPassDescriptor();
+    WebMetalRenderPassDescriptor();
 
-    Vector<RefPtr<WebGPURenderPassColorAttachmentDescriptor>> m_colorAttachments;
-    RefPtr<WebGPURenderPassDepthAttachmentDescriptor> m_depthAttachment;
+    Vector<RefPtr<WebMetalRenderPassColorAttachmentDescriptor>> m_colorAttachments;
+    RefPtr<WebMetalRenderPassDepthAttachmentDescriptor> m_depthAttachment;
 
     GPURenderPassDescriptor m_descriptor;
 };
 
 [
     Constructor,
-    Conditional=WEBGPU,
-    EnabledAtRuntime=WebGPU,
+    Conditional=WEBMETAL,
+    EnabledAtRuntime=WebMetal,
     ImplementationLacksVTable
-] interface WebGPURenderPassDescriptor {
+] interface WebMetalRenderPassDescriptor {
 
-    readonly attribute sequence<WebGPURenderPassColorAttachmentDescriptor> colorAttachments;
-    readonly attribute WebGPURenderPassDepthAttachmentDescriptor depthAttachment;
-    //readonly attribute WebGPURenderPassStencilAttachmentDescriptor stencilAttachment;
+    readonly attribute sequence<WebMetalRenderPassColorAttachmentDescriptor> colorAttachments;
+    readonly attribute WebMetalRenderPassDepthAttachmentDescriptor depthAttachment;
+    //readonly attribute WebMetalRenderPassStencilAttachmentDescriptor stencilAttachment;
 
     // renderTargetArrayLength
     // visibilityResultBuffer
  */
 
 #include "config.h"
-#include "WebGPURenderPipelineColorAttachmentDescriptor.h"
+#include "WebMetalRenderPipelineColorAttachmentDescriptor.h"
 
-#if ENABLE(WEBGPU)
+#if ENABLE(WEBMETAL)
 
 namespace WebCore {
 
-Ref<WebGPURenderPipelineColorAttachmentDescriptor> WebGPURenderPipelineColorAttachmentDescriptor::create(GPURenderPipelineColorAttachmentDescriptor&& descriptor)
+Ref<WebMetalRenderPipelineColorAttachmentDescriptor> WebMetalRenderPipelineColorAttachmentDescriptor::create(GPURenderPipelineColorAttachmentDescriptor&& descriptor)
 {
-    return adoptRef(*new WebGPURenderPipelineColorAttachmentDescriptor(WTFMove(descriptor)));
+    return adoptRef(*new WebMetalRenderPipelineColorAttachmentDescriptor(WTFMove(descriptor)));
 }
 
-WebGPURenderPipelineColorAttachmentDescriptor::WebGPURenderPipelineColorAttachmentDescriptor(GPURenderPipelineColorAttachmentDescriptor&& descriptor)
+WebMetalRenderPipelineColorAttachmentDescriptor::WebMetalRenderPipelineColorAttachmentDescriptor(GPURenderPipelineColorAttachmentDescriptor&& descriptor)
     : m_descriptor { WTFMove(descriptor) }
 {
 }
 
-unsigned WebGPURenderPipelineColorAttachmentDescriptor::pixelFormat() const
+unsigned WebMetalRenderPipelineColorAttachmentDescriptor::pixelFormat() const
 {
     return m_descriptor.pixelFormat();
 }
 
-void WebGPURenderPipelineColorAttachmentDescriptor::setPixelFormat(unsigned newPixelFormat)
+void WebMetalRenderPipelineColorAttachmentDescriptor::setPixelFormat(unsigned newPixelFormat)
 {
     m_descriptor.setPixelFormat(newPixelFormat);
 }
@@ -25,7 +25,7 @@
 
 #pragma once
 
-#if ENABLE(WEBGPU)
+#if ENABLE(WEBMETAL)
 
 #include "GPURenderPipelineColorAttachmentDescriptor.h"
 #include <wtf/Ref.h>
 
 namespace WebCore {
 
-class WebGPURenderPipelineColorAttachmentDescriptor : public RefCounted<WebGPURenderPipelineColorAttachmentDescriptor> {
+class WebMetalRenderPipelineColorAttachmentDescriptor : public RefCounted<WebMetalRenderPipelineColorAttachmentDescriptor> {
 public:
-    static Ref<WebGPURenderPipelineColorAttachmentDescriptor> create(GPURenderPipelineColorAttachmentDescriptor&&);
+    static Ref<WebMetalRenderPipelineColorAttachmentDescriptor> create(GPURenderPipelineColorAttachmentDescriptor&&);
 
     unsigned pixelFormat() const;
     void setPixelFormat(unsigned);
 
 private:
-    explicit WebGPURenderPipelineColorAttachmentDescriptor(GPURenderPipelineColorAttachmentDescriptor&&);
+    explicit WebMetalRenderPipelineColorAttachmentDescriptor(GPURenderPipelineColorAttachmentDescriptor&&);
 
     GPURenderPipelineColorAttachmentDescriptor m_descriptor;
 };
  */
 
 [
-    Conditional=WEBGPU,
-    EnabledAtRuntime=WebGPU,
+    Conditional=WEBMETAL,
+    EnabledAtRuntime=WebMetal,
     ImplementationLacksVTable
-] interface WebGPURenderPipelineColorAttachmentDescriptor {
+] interface WebMetalRenderPipelineColorAttachmentDescriptor {
 
     attribute unsigned long pixelFormat; // should be MTLPixelFormat
 
  */
 
 #include "config.h"
-#include "WebGPURenderPipelineDescriptor.h"
+#include "WebMetalRenderPipelineDescriptor.h"
 
-#if ENABLE(WEBGPU)
+#if ENABLE(WEBMETAL)
 
 #include "GPUFunction.h"
 #include "GPURenderPipelineColorAttachmentDescriptor.h"
-#include "WebGPUFunction.h"
-#include "WebGPURenderPipelineColorAttachmentDescriptor.h"
+#include "WebMetalFunction.h"
+#include "WebMetalRenderPipelineColorAttachmentDescriptor.h"
 
 namespace WebCore {
 
-Ref<WebGPURenderPipelineDescriptor> WebGPURenderPipelineDescriptor::create()
+Ref<WebMetalRenderPipelineDescriptor> WebMetalRenderPipelineDescriptor::create()
 {
-    return adoptRef(*new WebGPURenderPipelineDescriptor);
+    return adoptRef(*new WebMetalRenderPipelineDescriptor);
 }
 
-WebGPURenderPipelineDescriptor::WebGPURenderPipelineDescriptor() = default;
+WebMetalRenderPipelineDescriptor::WebMetalRenderPipelineDescriptor() = default;
 
-WebGPURenderPipelineDescriptor::~WebGPURenderPipelineDescriptor() = default;
+WebMetalRenderPipelineDescriptor::~WebMetalRenderPipelineDescriptor() = default;
 
-WebGPUFunction* WebGPURenderPipelineDescriptor::vertexFunction() const
+WebMetalFunction* WebMetalRenderPipelineDescriptor::vertexFunction() const
 {
     return m_vertexFunction.get();
 }
 
-void WebGPURenderPipelineDescriptor::setVertexFunction(RefPtr<WebGPUFunction>&& newVertexFunction)
+void WebMetalRenderPipelineDescriptor::setVertexFunction(RefPtr<WebMetalFunction>&& newVertexFunction)
 {
     // FIXME: Why can't we set this to null?
     if (!newVertexFunction)
@@ -60,12 +60,12 @@ void WebGPURenderPipelineDescriptor::setVertexFunction(RefPtr<WebGPUFunction>&&
     m_descriptor.setVertexFunction(m_vertexFunction->function());
 }
 
-WebGPUFunction* WebGPURenderPipelineDescriptor::fragmentFunction() const
+WebMetalFunction* WebMetalRenderPipelineDescriptor::fragmentFunction() const
 {
     return m_fragmentFunction.get();
 }
 
-void WebGPURenderPipelineDescriptor::setFragmentFunction(RefPtr<WebGPUFunction>&& newFragmentFunction)
+void WebMetalRenderPipelineDescriptor::setFragmentFunction(RefPtr<WebMetalFunction>&& newFragmentFunction)
 {
     // FIXME: Why can't we set this to null?
     if (!newFragmentFunction)
@@ -76,28 +76,28 @@ void WebGPURenderPipelineDescriptor::setFragmentFunction(RefPtr<WebGPUFunction>&
     m_descriptor.setFragmentFunction(m_fragmentFunction->function());
 }
 
-const Vector<RefPtr<WebGPURenderPipelineColorAttachmentDescriptor>>& WebGPURenderPipelineDescriptor::colorAttachments()
+const Vector<RefPtr<WebMetalRenderPipelineColorAttachmentDescriptor>>& WebMetalRenderPipelineDescriptor::colorAttachments()
 {
     if (!m_colorAttachments.size()) {
         auto attachments = m_descriptor.colorAttachments();
         m_colorAttachments.reserveInitialCapacity(attachments.size());
         for (auto& attachment : attachments)
-            m_colorAttachments.uncheckedAppend(WebGPURenderPipelineColorAttachmentDescriptor::create(WTFMove(attachment)));
+            m_colorAttachments.uncheckedAppend(WebMetalRenderPipelineColorAttachmentDescriptor::create(WTFMove(attachment)));
     }
     return m_colorAttachments;
 }
 
-unsigned WebGPURenderPipelineDescriptor::depthAttachmentPixelFormat() const
+unsigned WebMetalRenderPipelineDescriptor::depthAttachmentPixelFormat() const
 {
     return m_descriptor.depthAttachmentPixelFormat();
 }
 
-void WebGPURenderPipelineDescriptor::setDepthAttachmentPixelFormat(unsigned newPixelFormat)
+void WebMetalRenderPipelineDescriptor::setDepthAttachmentPixelFormat(unsigned newPixelFormat)
 {
     m_descriptor.setDepthAttachmentPixelFormat(newPixelFormat);
 }
 
-void WebGPURenderPipelineDescriptor::reset()
+void WebMetalRenderPipelineDescriptor::reset()
 {
     m_vertexFunction = nullptr;
     m_fragmentFunction = nullptr;
 
 #pragma once
 
-#if ENABLE(WEBGPU)
+#if ENABLE(WEBMETAL)
 
 #include "GPURenderPipelineDescriptor.h"
-#include "WebGPURenderPipelineColorAttachmentDescriptor.h"
+#include "WebMetalRenderPipelineColorAttachmentDescriptor.h"
 #include <wtf/Ref.h>
 #include <wtf/RefCounted.h>
 #include <wtf/Vector.h>
@@ -37,21 +37,21 @@ namespace WebCore {
 
 class GPUFunction;
 class GPURenderPipelineDescriptor;
-class WebGPUFunction;
-class WebGPURenderPipelineColorAttachmentDescriptor;
+class WebMetalFunction;
+class WebMetalRenderPipelineColorAttachmentDescriptor;
 
-class WebGPURenderPipelineDescriptor : public RefCounted<WebGPURenderPipelineDescriptor> {
+class WebMetalRenderPipelineDescriptor : public RefCounted<WebMetalRenderPipelineDescriptor> {
 public:
-    ~WebGPURenderPipelineDescriptor();
-    static Ref<WebGPURenderPipelineDescriptor> create();
+    ~WebMetalRenderPipelineDescriptor();
+    static Ref<WebMetalRenderPipelineDescriptor> create();
 
-    WebGPUFunction* vertexFunction() const;
-    void setVertexFunction(RefPtr<WebGPUFunction>&&);
+    WebMetalFunction* vertexFunction() const;
+    void setVertexFunction(RefPtr<WebMetalFunction>&&);
 
-    WebGPUFunction* fragmentFunction() const;
-    void setFragmentFunction(RefPtr<WebGPUFunction>&&);
+    WebMetalFunction* fragmentFunction() const;
+    void setFragmentFunction(RefPtr<WebMetalFunction>&&);
 
-    const Vector<RefPtr<WebGPURenderPipelineColorAttachmentDescriptor>>& colorAttachments();
+    const Vector<RefPtr<WebMetalRenderPipelineColorAttachmentDescriptor>>& colorAttachments();
 
     unsigned depthAttachmentPixelFormat() const;
     void setDepthAttachmentPixelFormat(unsigned);
@@ -61,12 +61,12 @@ public:
     const GPURenderPipelineDescriptor& descriptor() { return m_descriptor; }
 
 private:
-    WebGPURenderPipelineDescriptor();
+    WebMetalRenderPipelineDescriptor();
 
-    RefPtr<WebGPUFunction> m_vertexFunction;
-    RefPtr<WebGPUFunction> m_fragmentFunction;
+    RefPtr<WebMetalFunction> m_vertexFunction;
+    RefPtr<WebMetalFunction> m_fragmentFunction;
 
-    Vector<RefPtr<WebGPURenderPipelineColorAttachmentDescriptor>> m_colorAttachments;
+    Vector<RefPtr<WebMetalRenderPipelineColorAttachmentDescriptor>> m_colorAttachments;
 
     GPURenderPipelineDescriptor m_descriptor;
 };
 
 [
     Constructor,
-    Conditional=WEBGPU,
-    EnabledAtRuntime=WebGPU,
+    Conditional=WEBMETAL,
+    EnabledAtRuntime=WebMetal,
     ImplementationLacksVTable
-] interface WebGPURenderPipelineDescriptor {
+] interface WebMetalRenderPipelineDescriptor {
 
-    attribute WebGPUFunction? vertexFunction;
-    attribute WebGPUFunction? fragmentFunction;
+    attribute WebMetalFunction? vertexFunction;
+    attribute WebMetalFunction? fragmentFunction;
 
-    readonly attribute sequence<WebGPURenderPipelineColorAttachmentDescriptor> colorAttachments;
+    readonly attribute sequence<WebMetalRenderPipelineColorAttachmentDescriptor> colorAttachments;
 
     attribute unsigned long depthAttachmentPixelFormat;
 
  */
 
 #include "config.h"
-#include "WebGPURenderPipelineState.h"
+#include "WebMetalRenderPipelineState.h"
 
-#if ENABLE(WEBGPU)
+#if ENABLE(WEBMETAL)
 
 namespace WebCore {
 
-Ref<WebGPURenderPipelineState> WebGPURenderPipelineState::create(GPURenderPipelineState&& state)
+Ref<WebMetalRenderPipelineState> WebMetalRenderPipelineState::create(GPURenderPipelineState&& state)
 {
-    return adoptRef(*new WebGPURenderPipelineState(WTFMove(state)));
+    return adoptRef(*new WebMetalRenderPipelineState(WTFMove(state)));
 }
 
-WebGPURenderPipelineState::WebGPURenderPipelineState(GPURenderPipelineState&& state)
+WebMetalRenderPipelineState::WebMetalRenderPipelineState(GPURenderPipelineState&& state)
     : m_state { WTFMove(state) }
 {
 }
 
-String WebGPURenderPipelineState::label() const
+String WebMetalRenderPipelineState::label() const
 {
     return m_state.label();
 }
 
-void WebGPURenderPipelineState::setLabel(const String& label)
+void WebMetalRenderPipelineState::setLabel(const String& label)
 {
     m_state.setLabel(label);
 }
@@ -25,7 +25,7 @@
 
 #pragma once
 
-#if ENABLE(WEBGPU)
+#if ENABLE(WEBMETAL)
 
 #include "GPURenderPipelineState.h"
 #include <wtf/Ref.h>
@@ -33,9 +33,9 @@
 
 namespace WebCore {
 
-class WebGPURenderPipelineState : public RefCounted<WebGPURenderPipelineState> {
+class WebMetalRenderPipelineState : public RefCounted<WebMetalRenderPipelineState> {
 public:
-    static Ref<WebGPURenderPipelineState> create(GPURenderPipelineState&&);
+    static Ref<WebMetalRenderPipelineState> create(GPURenderPipelineState&&);
 
     String label() const;
     void setLabel(const String&);
@@ -43,7 +43,7 @@ public:
     const GPURenderPipelineState& state() const { return m_state; }
 
 private:
-    explicit WebGPURenderPipelineState(GPURenderPipelineState&&);
+    explicit WebMetalRenderPipelineState(GPURenderPipelineState&&);
 
     GPURenderPipelineState m_state;
 };
  */
 
 [
-    Conditional=WEBGPU,
-    EnabledAtRuntime=WebGPU,
+    Conditional=WEBMETAL,
+    EnabledAtRuntime=WebMetal,
     ImplementationLacksVTable
-] interface WebGPUDepthStencilState {
+] interface WebMetalRenderPipelineState {
 
     attribute DOMString label;
 
diff --git a/Source/WebCore/html/canvas/WebMetalRenderingContext.cpp b/Source/WebCore/html/canvas/WebMetalRenderingContext.cpp
new file mode 100644 (file)
index 0000000..169eabd
--- /dev/null
@@ -0,0 +1,196 @@
+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2017 Yuichiro Kikura (y.kikura@gmail.com)
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WebMetalRenderingContext.h"
+
+#if ENABLE(WEBMETAL)
+
+#include "Document.h"
+#include "FrameView.h"
+#include "GPUDevice.h"
+#include "InspectorInstrumentation.h"
+#include "WebMetalBuffer.h"
+#include "WebMetalCommandQueue.h"
+#include "WebMetalComputePipelineState.h"
+#include "WebMetalDepthStencilDescriptor.h"
+#include "WebMetalDepthStencilState.h"
+#include "WebMetalDrawable.h"
+#include "WebMetalFunction.h"
+#include "WebMetalLibrary.h"
+#include "WebMetalRenderPassDescriptor.h"
+#include "WebMetalRenderPipelineDescriptor.h"
+#include "WebMetalRenderPipelineState.h"
+#include "WebMetalTexture.h"
+#include "WebMetalTextureDescriptor.h"
+#include <JavaScriptCore/ArrayBuffer.h>
+#include <JavaScriptCore/JSCInlines.h>
+#include <JavaScriptCore/TypedArrayInlines.h>
+#include <JavaScriptCore/Uint32Array.h>
+#include <wtf/StdLibExtras.h>
+#include <wtf/text/CString.h>
+
+namespace {
+
+int clamp(int value, int min, int max)
+{
+    if (value < min)
+        value = min;
+    if (value > max)
+        value = max;
+    return value;
+}
+
+}
+
+namespace WebCore {
+
+static const int kMaxTextureSize = 4096;
+
+std::unique_ptr<WebMetalRenderingContext> WebMetalRenderingContext::create(CanvasBase& canvas)
+{
+    GPUDevice device;
+
+    if (!device) {
+        // FIXME: WebMetal - dispatch an event here for the failure.
+        return nullptr;
+    }
+
+    auto renderingContext = std::unique_ptr<WebMetalRenderingContext>(new WebMetalRenderingContext(canvas, WTFMove(device)));
+    renderingContext->suspendIfNeeded();
+
+    InspectorInstrumentation::didCreateCanvasRenderingContext(*renderingContext);
+
+    return renderingContext;
+}
+
+WebMetalRenderingContext::WebMetalRenderingContext(CanvasBase& canvas, GPUDevice&& device)
+    : GPUBasedCanvasRenderingContext(canvas)
+    , m_device(WTFMove(device))
+{
+    initializeNewContext();
+}
+
+HTMLCanvasElement* WebMetalRenderingContext::canvas() const
+{
+    auto& base = canvasBase();
+    if (!is<HTMLCanvasElement>(base))
+        return nullptr;
+    return &downcast<HTMLCanvasElement>(base);
+}
+
+void WebMetalRenderingContext::initializeNewContext()
+{
+    // FIXME: WebMetal - Maybe we should reset a bunch of stuff here.
+
+    IntSize canvasSize = clampedCanvasSize();
+    m_device.reshape(canvasSize.width(), canvasSize.height());
+}
+
+IntSize WebMetalRenderingContext::clampedCanvasSize() const
+{
+    return IntSize(clamp(canvas()->width(), 1, kMaxTextureSize),
+        clamp(canvas()->height(), 1, kMaxTextureSize));
+}
+
+bool WebMetalRenderingContext::hasPendingActivity() const
+{
+    return false;
+}
+
+void WebMetalRenderingContext::stop()
+{
+}
+
+const char* WebMetalRenderingContext::activeDOMObjectName() const
+{
+    return "WebMetalRenderingContext";
+}
+
+bool WebMetalRenderingContext::canSuspendForDocumentSuspension() const
+{
+    return false;
+}
+
+PlatformLayer* WebMetalRenderingContext::platformLayer() const
+{
+    return m_device.platformLayer();
+}
+
+void WebMetalRenderingContext::markLayerComposited()
+{
+    m_device.markLayerComposited();
+}
+
+void WebMetalRenderingContext::reshape(int width, int height)
+{
+    // FIXME: WebMetal - Do we need to reset stuff here?
+    m_device.reshape(width, height);
+}
+
+Ref<WebMetalLibrary> WebMetalRenderingContext::createLibrary(const String& sourceCode)
+{
+    return WebMetalLibrary::create(GPULibrary { m_device, sourceCode }, sourceCode);
+}
+
+Ref<WebMetalRenderPipelineState> WebMetalRenderingContext::createRenderPipelineState(WebMetalRenderPipelineDescriptor& descriptor)
+{
+    return WebMetalRenderPipelineState::create(GPURenderPipelineState { m_device, descriptor.descriptor() });
+}
+
+Ref<WebMetalDepthStencilState> WebMetalRenderingContext::createDepthStencilState(WebMetalDepthStencilDescriptor& descriptor)
+{
+    return WebMetalDepthStencilState::create(GPUDepthStencilState { m_device, descriptor.descriptor() });
+}
+
+Ref<WebMetalComputePipelineState> WebMetalRenderingContext::createComputePipelineState(WebMetalFunction& function)
+{
+    return WebMetalComputePipelineState::create(GPUComputePipelineState { m_device, function.function() });
+}
+
+Ref<WebMetalCommandQueue> WebMetalRenderingContext::createCommandQueue()
+{
+    return WebMetalCommandQueue::create(GPUCommandQueue { m_device });
+}
+
+Ref<WebMetalDrawable> WebMetalRenderingContext::nextDrawable()
+{
+    return WebMetalDrawable::create(GPUDrawable { m_device });
+}
+
+RefPtr<WebMetalBuffer> WebMetalRenderingContext::createBuffer(JSC::ArrayBufferView& data)
+{
+    return WebMetalBuffer::create(GPUBuffer { m_device, data });
+}
+
+Ref<WebMetalTexture> WebMetalRenderingContext::createTexture(WebMetalTextureDescriptor& descriptor)
+{
+    return WebMetalTexture::create(GPUTexture { m_device, descriptor.descriptor() });
+}
+
+} // namespace WebCore
+
+#endif
@@ -26,7 +26,7 @@
 
 #pragma once
 
-#if ENABLE(WEBGPU)
+#if ENABLE(WEBMETAL)
 
 #include "GPUBasedCanvasRenderingContext.h"
 #include "GPUDevice.h"
@@ -37,39 +37,39 @@ class ArrayBufferView;
 
 namespace WebCore {
 
-class WebGPUBuffer;
-class WebGPUCommandQueue;
-class WebGPUComputePipelineState;
-class WebGPUDepthStencilDescriptor;
-class WebGPUDepthStencilState;
-class WebGPUDrawable;
-class WebGPUFunction;
-class WebGPULibrary;
-class WebGPURenderPipelineDescriptor;
-class WebGPURenderPipelineState;
-class WebGPUTexture;
-class WebGPUTextureDescriptor;
-
-class WebGPURenderingContext final : public GPUBasedCanvasRenderingContext {
+class WebMetalBuffer;
+class WebMetalCommandQueue;
+class WebMetalComputePipelineState;
+class WebMetalDepthStencilDescriptor;
+class WebMetalDepthStencilState;
+class WebMetalDrawable;
+class WebMetalFunction;
+class WebMetalLibrary;
+class WebMetalRenderPipelineDescriptor;
+class WebMetalRenderPipelineState;
+class WebMetalTexture;
+class WebMetalTextureDescriptor;
+
+class WebMetalRenderingContext final : public GPUBasedCanvasRenderingContext {
 public:
-    static std::unique_ptr<WebGPURenderingContext> create(CanvasBase&);
+    static std::unique_ptr<WebMetalRenderingContext> create(CanvasBase&);
 
     // FIXME: IDL file says this is not nullable, but this function can return null.
     HTMLCanvasElement* canvas() const;
 
-    Ref<WebGPULibrary> createLibrary(const String&);
-    Ref<WebGPURenderPipelineState> createRenderPipelineState(WebGPURenderPipelineDescriptor&);
-    Ref<WebGPUDepthStencilState> createDepthStencilState(WebGPUDepthStencilDescriptor&);
-    Ref<WebGPUComputePipelineState> createComputePipelineState(WebGPUFunction&);
-    Ref<WebGPUCommandQueue> createCommandQueue();
-    Ref<WebGPUDrawable> nextDrawable();
-    RefPtr<WebGPUBuffer> createBuffer(JSC::ArrayBufferView&);
-    Ref<WebGPUTexture> createTexture(WebGPUTextureDescriptor&);
+    Ref<WebMetalLibrary> createLibrary(const String&);
+    Ref<WebMetalRenderPipelineState> createRenderPipelineState(WebMetalRenderPipelineDescriptor&);
+    Ref<WebMetalDepthStencilState> createDepthStencilState(WebMetalDepthStencilDescriptor&);
+    Ref<WebMetalComputePipelineState> createComputePipelineState(WebMetalFunction&);
+    Ref<WebMetalCommandQueue> createCommandQueue();
+    Ref<WebMetalDrawable> nextDrawable();
+    RefPtr<WebMetalBuffer> createBuffer(JSC::ArrayBufferView&);
+    Ref<WebMetalTexture> createTexture(WebMetalTextureDescriptor&);
 
     const GPUDevice& device() const { return m_device; }
 
 private:
-    WebGPURenderingContext(CanvasBase&, GPUDevice&&);
+    WebMetalRenderingContext(CanvasBase&, GPUDevice&&);
 
     bool hasPendingActivity() const final;
     void stop() final;
@@ -79,7 +79,7 @@ private:
     IntSize clampedCanvasSize() const;
     void initializeNewContext();
 
-    bool isWebGPU() const final { return true; }
+    bool isWebMetal() const final { return true; }
 
     void reshape(int width, int height) final;
     void markLayerComposited() final;
@@ -90,6 +90,6 @@ private:
 
 } // namespace WebCore
 
-SPECIALIZE_TYPE_TRAITS_CANVASRENDERINGCONTEXT(WebCore::WebGPURenderingContext, isWebGPU())
+SPECIALIZE_TYPE_TRAITS_CANVASRENDERINGCONTEXT(WebCore::WebMetalRenderingContext, isWebMetal())
 
 #endif
  */
 
 [
-    Conditional=WEBGPU,
-    EnabledAtRuntime=WebGPU,
+    Conditional=WEBMETAL,
+    EnabledAtRuntime=WebMetal,
     JSCustomMarkFunction,
     DoNotCheckConstants
-] interface WebGPURenderingContext {
+] interface WebMetalRenderingContext {
     // back-reference to the canvas
     readonly attribute HTMLCanvasElement canvas;
 
 
     // Entry points
 
-    WebGPULibrary createLibrary(DOMString sourceCode);
+    WebMetalLibrary createLibrary(DOMString sourceCode);
 
-    WebGPURenderPipelineState createRenderPipelineState(WebGPURenderPipelineDescriptor descriptor);
-    WebGPUDepthStencilState createDepthStencilState(WebGPUDepthStencilDescriptor descriptor);
-    WebGPUComputePipelineState createComputePipelineState(WebGPUFunction function);
+    WebMetalRenderPipelineState createRenderPipelineState(WebMetalRenderPipelineDescriptor descriptor);
+    WebMetalDepthStencilState createDepthStencilState(WebMetalDepthStencilDescriptor descriptor);
+    WebMetalComputePipelineState createComputePipelineState(WebMetalFunction function);
 
-    WebGPUCommandQueue createCommandQueue();
+    WebMetalCommandQueue createCommandQueue();
 
-    WebGPUDrawable nextDrawable();
+    WebMetalDrawable nextDrawable();
 
-    WebGPUBuffer? createBuffer(ArrayBufferView data);
+    WebMetalBuffer? createBuffer(ArrayBufferView data);
 
-    WebGPUTexture createTexture(WebGPUTextureDescriptor descriptor);
+    WebMetalTexture createTexture(WebMetalTextureDescriptor descriptor);
 
 };
similarity index 97%
rename from Source/WebCore/html/canvas/WebGPUSize.h
rename to Source/WebCore/html/canvas/WebMetalSize.h
index 5c121c5..4e425ad 100644 (file)
 
 #pragma once
 
-#if ENABLE(WEBGPU)
+#if ENABLE(WEBMETAL)
 
 namespace WebCore {
     
-struct WebGPUSize {
+struct WebMetalSize {
     unsigned width;
     unsigned height;
     unsigned depth;
similarity index 94%
rename from Source/WebCore/html/canvas/WebGPUSize.idl
rename to Source/WebCore/html/canvas/WebMetalSize.idl
index b9783fb..fae8c7d 100644 (file)
@@ -24,9 +24,9 @@
  */
  
 [
-    Conditional=WEBGPU,
-    EnabledAtRuntime=WebGPU
-] dictionary WebGPUSize {
+    Conditional=WEBMETAL,
+    EnabledAtRuntime=WebMetal
+] dictionary WebMetalSize {
     unsigned long width;
     unsigned long height;
     unsigned long depth;
  */
 
 #include "config.h"
-#include "WebGPUTexture.h"
+#include "WebMetalTexture.h"
 
-#if ENABLE(WEBGPU)
+#if ENABLE(WEBMETAL)
 
 namespace WebCore {
 
-Ref<WebGPUTexture> WebGPUTexture::create(GPUTexture&& texture)
+Ref<WebMetalTexture> WebMetalTexture::create(GPUTexture&& texture)
 {
-    return adoptRef(*new WebGPUTexture(WTFMove(texture)));
+    return adoptRef(*new WebMetalTexture(WTFMove(texture)));
 }
 
-WebGPUTexture::WebGPUTexture(GPUTexture&& texture)
+WebMetalTexture::WebMetalTexture(GPUTexture&& texture)
     : m_texture { WTFMove(texture) }
 {
 }
similarity index 90%
rename from Source/WebCore/html/canvas/WebGPUTexture.h
rename to Source/WebCore/html/canvas/WebMetalTexture.h
index 4c2f235..becb4aa 100644 (file)
@@ -25,7 +25,7 @@
 
 #pragma once
 
-#if ENABLE(WEBGPU)
+#if ENABLE(WEBMETAL)
 
 #include "GPUTexture.h"
 #include <wtf/Ref.h>
@@ -35,9 +35,9 @@ namespace WebCore {
 
 class GPUTextureDescriptor;
 
-class WebGPUTexture : public RefCounted<WebGPUTexture> {
+class WebMetalTexture : public RefCounted<WebMetalTexture> {
 public:
-    static Ref<WebGPUTexture> create(GPUTexture&&);
+    static Ref<WebMetalTexture> create(GPUTexture&&);
 
     unsigned width() const { return m_texture.width(); }
     unsigned height() const { return m_texture.height(); }
@@ -45,7 +45,7 @@ public:
     const GPUTexture& texture() const { return m_texture; }
 
 private:
-    explicit WebGPUTexture(GPUTexture&&);
+    explicit WebMetalTexture(GPUTexture&&);
 
     GPUTexture m_texture;
 };
  */
 
 [
-    Conditional=WEBGPU,
-    EnabledAtRuntime=WebGPU,
+    Conditional=WEBMETAL,
+    EnabledAtRuntime=WebMetal,
     ImplementationLacksVTable
-] interface WebGPUTexture {
+] interface WebMetalTexture {
 
     readonly attribute unsigned long width;
     readonly attribute unsigned long height;
  */
 
 #include "config.h"
-#include "WebGPUTextureDescriptor.h"
+#include "WebMetalTextureDescriptor.h"
 
-#if ENABLE(WEBGPU)
+#if ENABLE(WEBMETAL)
 
 namespace WebCore {
 
-Ref<WebGPUTextureDescriptor> WebGPUTextureDescriptor::create(unsigned pixelFormat, unsigned width, unsigned height, bool mipmapped)
+Ref<WebMetalTextureDescriptor> WebMetalTextureDescriptor::create(unsigned pixelFormat, unsigned width, unsigned height, bool mipmapped)
 {
-    return adoptRef(*new WebGPUTextureDescriptor(pixelFormat, width, height, mipmapped));
+    return adoptRef(*new WebMetalTextureDescriptor(pixelFormat, width, height, mipmapped));
 }
 
-WebGPUTextureDescriptor::WebGPUTextureDescriptor(unsigned pixelFormat, unsigned width, unsigned height, bool mipmapped)
+WebMetalTextureDescriptor::WebMetalTextureDescriptor(unsigned pixelFormat, unsigned width, unsigned height, bool mipmapped)
     : m_descriptor { pixelFormat, width, height, mipmapped }
 {
 }
 
-unsigned WebGPUTextureDescriptor::width() const
+unsigned WebMetalTextureDescriptor::width() const
 {
     return m_descriptor.width();
 }
 
-void WebGPUTextureDescriptor::setWidth(unsigned width)
+void WebMetalTextureDescriptor::setWidth(unsigned width)
 {
     m_descriptor.setWidth(width);
 }
 
-unsigned WebGPUTextureDescriptor::height() const
+unsigned WebMetalTextureDescriptor::height() const
 {
     return m_descriptor.height();
 }
 
-void WebGPUTextureDescriptor::setHeight(unsigned height)
+void WebMetalTextureDescriptor::setHeight(unsigned height)
 {
     m_descriptor.setHeight(height);
 }
 
-unsigned WebGPUTextureDescriptor::sampleCount() const
+unsigned WebMetalTextureDescriptor::sampleCount() const
 {
     return m_descriptor.sampleCount();
 }
 
-void WebGPUTextureDescriptor::setSampleCount(unsigned sampleCount)
+void WebMetalTextureDescriptor::setSampleCount(unsigned sampleCount)
 {
     m_descriptor.setSampleCount(sampleCount);
 }
 
-unsigned WebGPUTextureDescriptor::textureType() const
+unsigned WebMetalTextureDescriptor::textureType() const
 {
     return m_descriptor.textureType();
 }
 
-void WebGPUTextureDescriptor::setTextureType(unsigned textureType)
+void WebMetalTextureDescriptor::setTextureType(unsigned textureType)
 {
     m_descriptor.setTextureType(textureType);
 }
 
-unsigned WebGPUTextureDescriptor::storageMode() const
+unsigned WebMetalTextureDescriptor::storageMode() const
 {
     return m_descriptor.storageMode();
 }
 
-void WebGPUTextureDescriptor::setStorageMode(unsigned storageMode)
+void WebMetalTextureDescriptor::setStorageMode(unsigned storageMode)
 {
     m_descriptor.setStorageMode(storageMode);
 }
 
-unsigned WebGPUTextureDescriptor::usage() const
+unsigned WebMetalTextureDescriptor::usage() const
 {
     return m_descriptor.usage();
 }
 
-void WebGPUTextureDescriptor::setUsage(unsigned usage)
+void WebMetalTextureDescriptor::setUsage(unsigned usage)
 {
     m_descriptor.setUsage(usage);
 }
@@ -25,7 +25,7 @@
 
 #pragma once
 
-#if ENABLE(WEBGPU)
+#if ENABLE(WEBMETAL)
 
 #include "GPUTextureDescriptor.h"
 #include <wtf/Ref.h>
@@ -33,9 +33,9 @@
 
 namespace WebCore {
 
-class WebGPUTextureDescriptor : public RefCounted<WebGPUTextureDescriptor> {
+class WebMetalTextureDescriptor : public RefCounted<WebMetalTextureDescriptor> {
 public:
-    static Ref<WebGPUTextureDescriptor> create(unsigned pixelFormat, unsigned width, unsigned height, bool mipmapped);
+    static Ref<WebMetalTextureDescriptor> create(unsigned pixelFormat, unsigned width, unsigned height, bool mipmapped);
 
     unsigned width() const;
     void setWidth(unsigned);
@@ -58,7 +58,7 @@ public:
     const GPUTextureDescriptor& descriptor() { return m_descriptor; }
 
 private:
-    WebGPUTextureDescriptor(unsigned pixelFormat, unsigned width, unsigned height, bool mipmapped);
+    WebMetalTextureDescriptor(unsigned pixelFormat, unsigned width, unsigned height, bool mipmapped);
 
     GPUTextureDescriptor m_descriptor;
 };
 
 [
     Constructor(unsigned long pixelFormat, unsigned long width, unsigned long height, boolean mipmapped),
-    Conditional=WEBGPU,
-    EnabledAtRuntime=WebGPU,
+    Conditional=WEBMETAL,
+    EnabledAtRuntime=WebMetal,
     ImplementationLacksVTable
-] interface WebGPUTextureDescriptor {
+] interface WebMetalTextureDescriptor {
 
     attribute unsigned long textureType;
 
index 97a3f8c..96872a2 100644 (file)
@@ -63,8 +63,8 @@
 #if ENABLE(WEBGL2)
 #include "WebGL2RenderingContext.h"
 #endif
-#if ENABLE(WEBGPU)
-#include "WebGPURenderingContext.h"
+#if ENABLE(WEBMETAL)
+#include "WebMetalRenderingContext.h"
 #endif
 #include <JavaScriptCore/IdentifiersFactory.h>
 #include <JavaScriptCore/ScriptCallStack.h>
@@ -231,9 +231,9 @@ Ref<Inspector::Protocol::Canvas::Canvas> InspectorCanvas::buildObjectForCanvas(b
     else if (is<WebGL2RenderingContext>(m_context))
         contextType = Inspector::Protocol::Canvas::ContextType::WebGL2;
 #endif
-#if ENABLE(WEBGPU)
-    else if (is<WebGPURenderingContext>(m_context))
-        contextType = Inspector::Protocol::Canvas::ContextType::WebGPU;
+#if ENABLE(WEBMETAL)
+    else if (is<WebMetalRenderingContext>(m_context))
+        contextType = Inspector::Protocol::Canvas::ContextType::WebMetal;
 #endif
     else {
         ASSERT_NOT_REACHED();
index 460cbbf..c67c683 100644 (file)
@@ -56,8 +56,8 @@
 #include "JSWebGL2RenderingContext.h"
 #endif
 
-#if ENABLE(WEBGPU)
-#include "JSWebGPURenderingContext.h"
+#if ENABLE(WEBMETAL)
+#include "JSWebMetalRenderingContext.h"
 #endif
 
 
@@ -199,7 +199,7 @@ void InspectorCanvasAgent::requestContent(ErrorString& errorString, const String
 #endif
     }
 
-    // FIXME: <https://webkit.org/b/173621> Web Inspector: Support getting the content of WebGPU context;
+    // FIXME: <https://webkit.org/b/173621> Web Inspector: Support getting the content of WebMetal context;
     errorString = "Unsupported canvas context type"_s;
 }
 
@@ -230,9 +230,9 @@ static JSC::JSValue contextAsScriptValue(JSC::ExecState& state, CanvasRenderingC
     if (is<WebGL2RenderingContext>(context))
         return toJS(&state, deprecatedGlobalObjectForPrototype(&state), downcast<WebGL2RenderingContext>(context));
 #endif
-#if ENABLE(WEBGPU)
-    if (is<WebGPURenderingContext>(context))
-        return toJS(&state, deprecatedGlobalObjectForPrototype(&state), downcast<WebGPURenderingContext>(context));
+#if ENABLE(WEBMETAL)