diff options
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/frontend/emu_window.h | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/src/core/frontend/emu_window.h b/src/core/frontend/emu_window.h index 856cb61e9..5eb87fb63 100644 --- a/src/core/frontend/emu_window.h +++ b/src/core/frontend/emu_window.h | |||
| @@ -12,45 +12,6 @@ | |||
| 12 | 12 | ||
| 13 | namespace Core::Frontend { | 13 | namespace Core::Frontend { |
| 14 | 14 | ||
| 15 | struct Frame; | ||
| 16 | /** | ||
| 17 | * For smooth Vsync rendering, we want to always present the latest frame that the core generates, | ||
| 18 | * but also make sure that rendering happens at the pace that the frontend dictates. This is a | ||
| 19 | * helper class that the renderer can define to sync frames between the render thread and the | ||
| 20 | * presentation thread | ||
| 21 | */ | ||
| 22 | class TextureMailbox { | ||
| 23 | public: | ||
| 24 | virtual ~TextureMailbox() = default; | ||
| 25 | |||
| 26 | /** | ||
| 27 | * Recreate the render objects attached to this frame with the new specified width/height | ||
| 28 | */ | ||
| 29 | virtual void ReloadRenderFrame(Frontend::Frame* frame, u32 width, u32 height) = 0; | ||
| 30 | |||
| 31 | /** | ||
| 32 | * Recreate the presentation objects attached to this frame with the new specified width/height | ||
| 33 | */ | ||
| 34 | virtual void ReloadPresentFrame(Frontend::Frame* frame, u32 width, u32 height) = 0; | ||
| 35 | |||
| 36 | /** | ||
| 37 | * Render thread calls this to get an available frame to present | ||
| 38 | */ | ||
| 39 | virtual Frontend::Frame* GetRenderFrame() = 0; | ||
| 40 | |||
| 41 | /** | ||
| 42 | * Render thread calls this after draw commands are done to add to the presentation mailbox | ||
| 43 | */ | ||
| 44 | virtual void ReleaseRenderFrame(Frame* frame) = 0; | ||
| 45 | |||
| 46 | /** | ||
| 47 | * Presentation thread calls this to get the latest frame available to present. If there is no | ||
| 48 | * frame available after timeout, returns the previous frame. If there is no previous frame it | ||
| 49 | * returns nullptr | ||
| 50 | */ | ||
| 51 | virtual Frontend::Frame* TryGetPresentFrame(int timeout_ms) = 0; | ||
| 52 | }; | ||
| 53 | |||
| 54 | /** | 15 | /** |
| 55 | * Represents a graphics context that can be used for background computation or drawing. If the | 16 | * Represents a graphics context that can be used for background computation or drawing. If the |
| 56 | * graphics backend doesn't require the context, then the implementation of these methods can be | 17 | * graphics backend doesn't require the context, then the implementation of these methods can be |
| @@ -168,8 +129,6 @@ public: | |||
| 168 | */ | 129 | */ |
| 169 | void UpdateCurrentFramebufferLayout(unsigned width, unsigned height); | 130 | void UpdateCurrentFramebufferLayout(unsigned width, unsigned height); |
| 170 | 131 | ||
| 171 | std::unique_ptr<TextureMailbox> mailbox; | ||
| 172 | |||
| 173 | protected: | 132 | protected: |
| 174 | EmuWindow(); | 133 | EmuWindow(); |
| 175 | virtual ~EmuWindow(); | 134 | virtual ~EmuWindow(); |