mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 05:19:56 +00:00
Remove "SwapBuffers" from the GraphicsContext interface.
Buildfixes More buildfix headless buildfix One more buildfix
This commit is contained in:
parent
ed9b033f7d
commit
1ea11c233c
@ -16,8 +16,6 @@ public:
|
||||
virtual void Shutdown() = 0;
|
||||
virtual void SwapInterval(int interval) = 0;
|
||||
|
||||
virtual void SwapBuffers() = 0;
|
||||
|
||||
// Used during window resize. Must be called from the window thread,
|
||||
// not the rendering thread or CPU thread.
|
||||
virtual void Pause() {}
|
||||
|
@ -227,10 +227,6 @@ void Core_RunLoop(GraphicsContext *ctx) {
|
||||
if (sleepTime > 0)
|
||||
sleep_ms(sleepTime);
|
||||
}
|
||||
|
||||
if ((!windowHidden && !Core_IsStepping()) || menuThrottle) {
|
||||
ctx->SwapBuffers();
|
||||
}
|
||||
}
|
||||
|
||||
void Core_DoSingleStep() {
|
||||
|
@ -70,7 +70,6 @@ public:
|
||||
// See TODO in constructor.
|
||||
// renderManager_->SwapInterval(interval);
|
||||
}
|
||||
void SwapBuffers() override {}
|
||||
void Resize() override {}
|
||||
|
||||
Draw::DrawContext *GetDrawContext() override {
|
||||
|
@ -19,10 +19,6 @@ public:
|
||||
void Shutdown() override;
|
||||
void ShutdownFromRenderThread() override;
|
||||
|
||||
void SwapBuffers() override {
|
||||
// Do nothing, the render thread takes care of this.
|
||||
}
|
||||
|
||||
// Gets forwarded to the render thread.
|
||||
void SwapInterval(int interval) override;
|
||||
|
||||
|
@ -1452,8 +1452,6 @@ int main(int argc, char *argv[]) {
|
||||
break;
|
||||
}
|
||||
|
||||
graphicsContext->SwapBuffers();
|
||||
|
||||
{
|
||||
std::lock_guard<std::mutex> guard(g_mutexWindow);
|
||||
if (g_windowState.update) {
|
||||
|
@ -26,10 +26,6 @@ public:
|
||||
|
||||
void Shutdown() override;
|
||||
|
||||
void SwapBuffers() override {
|
||||
// We don't do it this way.
|
||||
}
|
||||
|
||||
void Resize() override;
|
||||
|
||||
void Poll() override;
|
||||
|
@ -20,7 +20,6 @@ public:
|
||||
|
||||
void Shutdown() override;
|
||||
void SwapInterval(int interval) override {}
|
||||
void SwapBuffers() override {}
|
||||
void Resize() override {}
|
||||
Draw::DrawContext * GetDrawContext() override {
|
||||
return draw_;
|
||||
|
@ -31,7 +31,6 @@ public:
|
||||
bool Init(HINSTANCE hInst, HWND window, std::string *error_message) override;
|
||||
void Shutdown() override;
|
||||
void SwapInterval(int interval) override;
|
||||
void SwapBuffers() override {}
|
||||
|
||||
void Resize() override;
|
||||
|
||||
|
@ -35,7 +35,6 @@ public:
|
||||
bool Init(HINSTANCE hInst, HWND window, std::string *error_message) override;
|
||||
void Shutdown() override;
|
||||
void SwapInterval(int interval) override;
|
||||
void SwapBuffers() override {}
|
||||
|
||||
void Resize() override;
|
||||
|
||||
|
@ -39,7 +39,7 @@
|
||||
// Currently, just compile time for debugging. May be NVIDIA only.
|
||||
static const int simulateGLES = false;
|
||||
|
||||
void WindowsGLContext::SwapBuffers() {
|
||||
void WindowsGLContext::Poll() {
|
||||
// We no longer call RenderManager::Swap here, it's handled by the render thread, which
|
||||
// we're not on here.
|
||||
|
||||
|
@ -18,7 +18,8 @@ public:
|
||||
|
||||
void Shutdown() override;
|
||||
void SwapInterval(int interval) override;
|
||||
void SwapBuffers() override;
|
||||
|
||||
void Poll() override;
|
||||
|
||||
// Used during window resize. Must be called from the window thread,
|
||||
// not the rendering thread or CPU thread.
|
||||
|
@ -7,4 +7,3 @@ class WindowsGraphicsContext : public GraphicsContext {
|
||||
public:
|
||||
virtual bool Init(HINSTANCE hInst, HWND window, std::string *error_message) = 0;
|
||||
};
|
||||
|
||||
|
@ -30,7 +30,6 @@ public:
|
||||
bool Init(HINSTANCE hInst, HWND window, std::string *error_message) override;
|
||||
void Shutdown() override;
|
||||
void SwapInterval(int interval) override {}
|
||||
void SwapBuffers() override {}
|
||||
void Resize() override;
|
||||
void Poll() override;
|
||||
|
||||
|
@ -15,7 +15,6 @@ public:
|
||||
void ShutdownFromRenderThread() override;
|
||||
|
||||
void Shutdown() override {}
|
||||
void SwapBuffers() override {}
|
||||
void SwapInterval(int interval) override {}
|
||||
void Resize() override {}
|
||||
|
||||
|
@ -16,7 +16,6 @@ public:
|
||||
|
||||
void Shutdown() override;
|
||||
void SwapInterval(int interval) override;
|
||||
void SwapBuffers() override {}
|
||||
void Resize() override;
|
||||
|
||||
void *GetAPIContext() override { return g_Vulkan; }
|
||||
|
@ -96,7 +96,6 @@ public:
|
||||
void Shutdown() override {}
|
||||
void Resize() override {}
|
||||
void SwapInterval(int interval) override {}
|
||||
void SwapBuffers() override {}
|
||||
|
||||
private:
|
||||
Draw::DrawContext *draw_ = nullptr;
|
||||
@ -193,7 +192,6 @@ bool SDLHeadlessHost::InitGraphics(std::string *error_message, GraphicsContext *
|
||||
if (!gfx_->ThreadFrame()) {
|
||||
break;
|
||||
}
|
||||
gfx_->SwapBuffers();
|
||||
}
|
||||
|
||||
threadState_ = RenderThreadState::STOPPING;
|
||||
@ -221,7 +219,6 @@ void SDLHeadlessHost::ShutdownGraphics() {
|
||||
}
|
||||
|
||||
void SDLHeadlessHost::SwapBuffers() {
|
||||
gfx_->SwapBuffers();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -132,7 +132,6 @@ bool WindowsHeadlessHost::InitGraphics(std::string *error_message, GraphicsConte
|
||||
if (!gfx_->ThreadFrame()) {
|
||||
break;
|
||||
}
|
||||
gfx_->SwapBuffers();
|
||||
}
|
||||
|
||||
threadState_ = RenderThreadState::STOPPING;
|
||||
@ -173,5 +172,4 @@ void WindowsHeadlessHost::SwapBuffers() {
|
||||
TranslateMessage(&msg);
|
||||
DispatchMessage(&msg);
|
||||
}
|
||||
gfx_->SwapBuffers();
|
||||
}
|
||||
|
@ -64,7 +64,6 @@ public:
|
||||
}
|
||||
|
||||
void SwapInterval(int interval) override {}
|
||||
void SwapBuffers() override {}
|
||||
void Resize() override {}
|
||||
void Shutdown() override {}
|
||||
|
||||
|
@ -22,6 +22,7 @@ public:
|
||||
DestroyDrawContext();
|
||||
}
|
||||
void SwapInterval(int interval) override {}
|
||||
virtual void SwapBuffers() = 0;
|
||||
void Resize() override {}
|
||||
|
||||
virtual void GotBackbuffer();
|
||||
|
@ -1174,7 +1174,7 @@ namespace Libretro
|
||||
|
||||
if (ctx->GetDrawContext()) {
|
||||
ctx->GetDrawContext()->EndFrame();
|
||||
ctx->GetDrawContext()->Present();
|
||||
ctx->GetDrawContext()->Present(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user