WebGPU Backend
<rdar://problem/31002364>
Created attachment 304216 [details] Patch
Comment on attachment 304216 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=304216&action=review > Source/WebCore/platform/graphics/cocoa/GPUBufferMetal.mm:45 > + m_buffer = (MTLBuffer *)[device->platformDevice() newBufferWithBytes:data->baseAddress() length:data->byteLength() options:MTLResourceOptionCPUCacheModeDefault]; adoptNS()? > Source/WebCore/platform/graphics/cocoa/GPUCommandQueueMetal.mm:45 > + m_commandQueue = (MTLCommandQueue *)[device->platformDevice() newCommandQueue]; adoptNS()? > Source/WebCore/platform/graphics/cocoa/GPUDepthStencilDescriptorMetal.mm:42 > + m_depthStencilDescriptor = (MTLDepthStencilDescriptor *)[MTLDepthStencilDescriptor new]; adoptNS()? > Source/WebCore/platform/graphics/cocoa/GPUDepthStencilStateMetal.mm:46 > + m_depthStencilState = (MTLDepthStencilState *)[device->platformDevice() newDepthStencilStateWithDescriptor:descriptor->platformDepthStencilDescriptor()]; adoptNS()? > Source/WebCore/platform/graphics/cocoa/GPUFunctionMetal.mm:44 > + m_function = (MTLFunction *)[library->platformLibrary() newFunctionWithName:name]; adoptNS()? > Source/WebCore/platform/graphics/cocoa/GPULibraryMetal.mm:46 > + m_library = (MTLLibrary *)[device->platformDevice() newLibraryWithSource:sourceCode options:nil error:&error]; adoptNS()? > Source/WebCore/platform/graphics/cocoa/GPURenderPassColorAttachmentDescriptorMetal.mm:52 > + MTLRenderPassColorAttachmentDescriptor *colorAttachmentDescriptor = static_cast<MTLRenderPassColorAttachmentDescriptor*>(m_renderPassAttachmentDescriptor.get()); space: static_cast<MTLRenderPassColorAttachmentDescriptor *> > Source/WebCore/platform/graphics/cocoa/GPURenderPassColorAttachmentDescriptorMetal.mm:72 > + return static_cast<MTLRenderPassColorAttachmentDescriptor*>(platformRenderPassAttachmentDescriptor()); space: static_cast<MTLRenderPassColorAttachmentDescriptor *> > Source/WebCore/platform/graphics/cocoa/GPURenderPassDepthAttachmentDescriptorMetal.mm:52 > + MTLRenderPassDepthAttachmentDescriptor *depthAttachmentDescriptor = static_cast<MTLRenderPassDepthAttachmentDescriptor*>(m_renderPassAttachmentDescriptor.get()); space: static_cast<MTLRenderPassDepthAttachmentDescriptor *> > Source/WebCore/platform/graphics/cocoa/GPURenderPassDepthAttachmentDescriptorMetal.mm:67 > + return static_cast<MTLRenderPassDepthAttachmentDescriptor*>(platformRenderPassAttachmentDescriptor()); space: static_cast<MTLRenderPassDepthAttachmentDescriptor *> > Source/WebCore/platform/graphics/cocoa/GPURenderPassDescriptorMetal.mm:43 > + m_renderPassDescriptor = (MTLRenderPassDescriptor *)[MTLRenderPassDescriptor new]; adoptNS()? > Source/WebCore/platform/graphics/cocoa/GPURenderPipelineDescriptorMetal.mm:43 > + m_renderPipelineDescriptor = (MTLRenderPipelineDescriptor *)[MTLRenderPipelineDescriptor new]; adoptNS()? > Source/WebCore/platform/graphics/cocoa/GPURenderPipelineStateMetal.mm:46 > + m_renderPipelineState = (MTLRenderPipelineState *)[device->platformDevice() newRenderPipelineStateWithDescriptor:descriptor->platformRenderPipelineDescriptor() error:nil]; adoptNS()? > Source/WebCore/platform/graphics/cocoa/GPUTextureMetal.mm:47 > + m_texture = (MTLTexture *)[device->platformDevice() newTextureWithDescriptor:descriptor->platformTextureDescriptor()]; adoptNS()?
Comment on attachment 304216 [details] Patch Confirmed with Dean out-of-band that adoptNS() was needed. Will check in patch with adoptNS() wrapped in the places I marked.
Committed r213780.
*** Bug 169367 has been marked as a duplicate of this bug. ***
*** Bug 169368 has been marked as a duplicate of this bug. ***
*** Bug 169370 has been marked as a duplicate of this bug. ***
*** Bug 169372 has been marked as a duplicate of this bug. ***