[webkit-reviews] review granted: [Bug 194406] [Web GPU] Update GPUSwapChainDescriptor, GPUSwapChain and implement GPUCanvasContext : [Attachment 364235] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 11 16:30:56 PDT 2019


Myles C. Maxfield <mmaxfield at apple.com> has granted Justin Fan
<justin_fan at apple.com>'s request for review:
Bug 194406: [Web GPU] Update GPUSwapChainDescriptor, GPUSwapChain and implement
GPUCanvasContext
https://bugs.webkit.org/show_bug.cgi?id=194406

Attachment 364235: Patch

https://bugs.webkit.org/attachment.cgi?id=364235&action=review




--- Comment #11 from Myles C. Maxfield <mmaxfield at apple.com> ---
Comment on attachment 364235
  --> https://bugs.webkit.org/attachment.cgi?id=364235
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=364235&action=review

> Source/WebCore/Modules/webgpu/GPUCanvasContext.cpp:71
> +    if (m_swapChain && m_swapChain->swapChain())
> +	   m_swapChain->swapChain()->present();

I don't quite understand this. Maybe Dean can help here.

> Source/WebCore/platform/graphics/gpu/cocoa/GPURenderPassEncoderMetal.mm:170
> +    useAttachments(buffer, WTFMove(descriptor));

Cool.

> Source/WebCore/platform/graphics/gpu/cocoa/GPUSwapChainMetal.mm:66
> +static RetainPtr<WebGPULayer> tryCreateSwapLayer(MTLDevice *device,
MTLPixelFormat format, OptionSet<GPUTextureUsage::Flags> usage)

"Create Swap"? "Swap Layer"? This could be named better.

> Source/WebCore/platform/graphics/gpu/cocoa/GPUSwapChainMetal.mm:109
> +    setLayerShape(swapLayer.get(), width, height);

Shouldn't we be hooking this up to get called when the canvas backing store
changes size?


More information about the webkit-reviews mailing list