Skip to content

Commit c0d82b0

Browse files
committed
Change from taking ownership of of the webgpu handles to using the shared pointer constructor
1 parent 841c9a6 commit c0d82b0

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

defold-rive/src/private/renderer_context_webgpu.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ namespace dmRive
4040
m_RenderToTexture = true; // render to texture is the default
4141
m_TargetTexture = 0;
4242
m_BackingTexture = 0;
43-
m_Adapter = wgpu::Adapter::Acquire(webgpu_adapter);
44-
m_Device = wgpu::Device::Acquire(webgpu_device);
45-
m_Queue = wgpu::Queue::Acquire(webgpu_queue);
43+
m_Adapter = wgpu::Adapter(webgpu_adapter);
44+
m_Device = wgpu::Device(webgpu_device);
45+
m_Queue = wgpu::Queue(webgpu_queue);
4646

4747
dmLogInfo("Before creating WebGPU context. (RIVE_WEBGPU=%d)", RIVE_WEBGPU);
4848

@@ -96,9 +96,9 @@ namespace dmRive
9696
dmGraphics::HTexture frame_buffer = dmGraphics::WebGPUGetActiveSwapChainTexture(m_GraphicsContext);
9797
WGPUTexture webgpu_texture = dmGraphics::WebGPUGetTexture(m_GraphicsContext, frame_buffer);
9898
WGPUTextureView webgpu_texture_view = dmGraphics::WebGPUGetTextureView(m_GraphicsContext, frame_buffer);
99-
m_BackingTextureView = wgpu::TextureView::Acquire(webgpu_texture_view);
99+
m_BackingTextureView = wgpu::TextureView(webgpu_texture_view);
100100

101-
m_RenderTarget->setTargetTextureView(m_BackingTextureView, wgpu::Texture::Acquire(webgpu_texture));
101+
m_RenderTarget->setTargetTextureView(m_BackingTextureView, wgpu::Texture(webgpu_texture));
102102
}
103103

104104
m_RenderContext->flush({
@@ -151,9 +151,9 @@ namespace dmRive
151151

152152
WGPUTexture webgpu_texture = dmGraphics::WebGPUGetTexture(m_GraphicsContext, m_BackingTexture);
153153
WGPUTextureView webgpu_texture_view = dmGraphics::WebGPUGetTextureView(m_GraphicsContext, m_BackingTexture);
154-
m_BackingTextureView = wgpu::TextureView::Acquire(webgpu_texture_view);
154+
m_BackingTextureView = wgpu::TextureView(webgpu_texture_view);
155155

156-
m_RenderTarget->setTargetTextureView(m_BackingTextureView, wgpu::Texture::Acquire(webgpu_texture));
156+
m_RenderTarget->setTargetTextureView(m_BackingTextureView, wgpu::Texture(webgpu_texture));
157157

158158
m_RenderToTexture = true;
159159
}

0 commit comments

Comments
 (0)