Skip to content

Commit f3da9b3

Browse files
WebGPU: Simplify SwapChainWebGPUImpl logic
1 parent 017f804 commit f3da9b3

File tree

2 files changed

+135
-320
lines changed

2 files changed

+135
-320
lines changed

Graphics/GraphicsEngineWebGPU/include/SwapChainWebGPUImpl.hpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,21 +81,19 @@ class SwapChainWebGPUImpl final : public SwapChainBase<ISwapChainWebGPU>
8181

8282
void ConfigureSurface();
8383

84-
void CreateBuffersAndViews();
84+
void CreateDepthBufferView();
85+
86+
void RecreateSwapChain();
8587

8688
void ReleaseSwapChainResources();
8789

88-
void RecreateSwapChain();
90+
WGPUSurfaceGetCurrentTextureStatus AcquireSurfaceTexture();
8991

9092
private:
91-
class PresentCommand;
92-
9393
NativeWindow m_NativeWindow;
9494
WebGPUSurfaceWrapper m_wgpuSurface;
9595
RefCntAutoPtr<ITextureViewWebGPU> m_pBackBufferRTV;
96-
RefCntAutoPtr<ITextureViewWebGPU> m_pBackBufferSRV;
9796
RefCntAutoPtr<ITextureViewWebGPU> m_pDepthBufferDSV;
98-
std::unique_ptr<PresentCommand> m_pCmdPresent;
9997
bool m_VSyncEnabled = true;
10098
};
10199

0 commit comments

Comments
 (0)