Codechange: [Win32] Move GDI specific drawing code into the GDI video driver class.

This commit is contained in:
Michael Lutz
2021-01-16 16:58:48 +01:00
parent 59e0d9618b
commit 8b90d4abe0
2 changed files with 142 additions and 133 deletions

View File

@@ -37,15 +37,20 @@ protected:
void InputLoop() override;
bool LockVideoBuffer() override;
void UnlockVideoBuffer() override;
void Paint() override;
void PaintThread() override;
void CheckPaletteAnim() override;
bool MakeWindow(bool full_screen);
/** (Re-)create the backing store. */
virtual bool AllocateBackingStore(int w, int h, bool force = false) = 0;
/** Palette of the window has changed. */
virtual void PaletteChanged(HWND hWnd) = 0;
private:
std::unique_lock<std::recursive_mutex> draw_lock;
void ClientSizeChanged(int w, int h);
static void PaintThreadThunk(VideoDriver_Win32Base *drv);
friend LRESULT CALLBACK WndProcGdi(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
@@ -60,6 +65,13 @@ public:
bool AfterBlitterChange() override;
const char *GetName() const override { return "win32"; }
protected:
void Paint() override;
void PaintThread() override;
bool AllocateBackingStore(int w, int h, bool force = false) override;
void PaletteChanged(HWND hWnd) override;
};
/** The factory for Windows' video driver. */