VideoBackendBase: Do save state logic on the GPU thread

This commit is contained in:
Stenzek
2019-06-29 18:35:12 +10:00
parent a25a4e0708
commit b26bb0605b
7 changed files with 40 additions and 30 deletions

View File

@ -63,18 +63,17 @@ public:
// Called by the UI thread when the graphics config is opened.
static void PopulateBackendInfo();
// the implementation needs not do synchronization logic, because calls to it are surrounded by
// PauseAndLock now
// Wrapper function which pushes the event to the GPU thread.
void DoState(PointerWrap& p);
void CheckInvalidState();
// Function which handles the real state load/save logic.
void DoStateGPUThread(PointerWrap& p);
protected:
void InitializeShared();
void ShutdownShared();
bool m_initialized = false;
bool m_invalid = false;
};
extern std::vector<std::unique_ptr<VideoBackendBase>> g_available_video_backends;