Debian Codegraph @

Source/Core/VideoBackends/D3D/D3DSwapChain.h

raw symbols SCIP
1 // Copyright 2019 Dolphin Emulator Project
2 // SPDX-License-Identifier: GPL-2.0-or-later
3
4 #pragma once
5
6 #include <d3d11_4.h>
7 #include <memory>
8 #include <vector>
9
10 #include "Common/CommonTypes.h"
11 #include "Common/WindowSystemInfo.h"
12 #include "VideoBackends/D3D/D3DBase.h"
13 #include "VideoBackends/D3DCommon/SwapChain.h"
14 #include "VideoCommon/TextureConfig.h"
15
16 namespace DX11
17 {
18 class DXTexture;
19 class DXFramebuffer;
20
21 class SwapChain : public D3DCommon::SwapChain
22 {
23 public:
24 SwapChain(const WindowSystemInfo& wsi, IDXGIFactory* dxgi_factory, ID3D11Device* d3d_device);
25 ~SwapChain();
26
27 static std::unique_ptr<SwapChain> Create(const WindowSystemInfo& wsi);
28
29 DXTexture* GetTexture() const { return m_texture.get(); }
30 DXFramebuffer* GetFramebuffer() const { return m_framebuffer.get(); }
31
32 protected:
33 bool CreateSwapChainBuffers() override;
34 void DestroySwapChainBuffers() override;
35
36 private:
37 // The runtime takes care of renaming the buffers.
38 std::unique_ptr<DXTexture> m_texture;
39 std::unique_ptr<DXFramebuffer> m_framebuffer;
40 };
41
42 } // namespace DX11