[UI/D3D12] Small refactoring, allow BeginSwap to return false if no surface

This commit is contained in:
Triang3l
2020-09-14 23:27:19 +03:00
parent acb1fc059f
commit dfbe36a8aa
9 changed files with 149 additions and 132 deletions

View File

@@ -28,9 +28,9 @@ class D3D12Context : public GraphicsContext {
ImmediateDrawer* immediate_drawer() override;
bool WasLost() override { return context_lost_; }
bool WasLost() override;
void BeginSwap() override;
bool BeginSwap() override;
void EndSwap() override;
std::unique_ptr<RawImage> Capture() override;
@@ -69,11 +69,10 @@ class D3D12Context : public GraphicsContext {
private:
friend class D3D12Provider;
explicit D3D12Context(D3D12Provider* provider, Window* target_window);
bool Initialize();
private:
bool Initialize();
bool InitializeSwapChainBuffers();
void Shutdown();