renderer_opengl: Remove emulated mailbox presentation

Emulated mailbox presentation was causing performance issues on
Nvidia's OpenGL driver. Remove it.
This commit is contained in:
ReinUsesLisp 2020-09-19 17:15:02 -03:00
parent 1a3f019bad
commit f4dbeb72d7
13 changed files with 35 additions and 360 deletions

View file

@ -218,15 +218,6 @@ public:
virtual ~RenderWidget() = default;
/// Called on the UI thread when this Widget is ready to draw
/// Dervied classes can override this to draw the latest frame.
virtual void Present() {}
void paintEvent(QPaintEvent* event) override {
Present();
update();
}
QPaintEngine* paintEngine() const override {
return nullptr;
}
@ -245,20 +236,8 @@ public:
context = std::move(context_);
}
void Present() override {
if (!isVisible()) {
return;
}
context->MakeCurrent();
if (Core::System::GetInstance().Renderer().TryPresent(100)) {
context->SwapBuffers();
glFinish();
}
}
private:
std::unique_ptr<Core::Frontend::GraphicsContext> context{};
std::unique_ptr<Core::Frontend::GraphicsContext> context;
};
#ifdef HAS_VULKAN