Plugin System (#1590)

---------

Co-authored-by: Mihai Fufezan <fufexan@protonmail.com>
This commit is contained in:
Vaxry 2023-02-27 12:32:38 +00:00 committed by GitHub
parent 74a10f26a4
commit 8b81f41e52
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
45 changed files with 1691 additions and 85 deletions

View file

@ -197,6 +197,8 @@ void Events::listener_monitorFrame(void* owner, void* data) {
return;
}
PMONITOR->renderingActive = true;
// we need to cleanup fading out when rendering the appropriate context
g_pCompositor->cleanupFadingOut(PMONITOR->ID);
@ -207,6 +209,8 @@ void Events::listener_monitorFrame(void* owner, void* data) {
if (*PDAMAGEBLINK || *PVFR == 0)
g_pCompositor->scheduleFrameForMonitor(PMONITOR);
PMONITOR->renderingActive = false;
return;
}
@ -260,6 +264,9 @@ void Events::listener_monitorFrame(void* owner, void* data) {
if (PMONITOR == g_pCompositor->m_vMonitors.front().get())
g_pHyprError->draw();
if (PMONITOR == g_pCompositor->m_pLastMonitor)
g_pHyprNotificationOverlay->draw(PMONITOR);
// for drawing the debug overlay
if (PMONITOR == g_pCompositor->m_vMonitors.front().get() && *PDEBUGOVERLAY == 1) {
startRenderOverlay = std::chrono::high_resolution_clock::now();
@ -306,12 +313,16 @@ void Events::listener_monitorFrame(void* owner, void* data) {
pixman_region32_fini(&frameDamage);
pixman_region32_fini(&damage);
PMONITOR->renderingActive = false;
if (!wlr_output_commit(PMONITOR->output))
return;
if (*PDAMAGEBLINK || *PVFR == 0)
if (*PDAMAGEBLINK || *PVFR == 0 || PMONITOR->pendingFrame)
g_pCompositor->scheduleFrameForMonitor(PMONITOR);
PMONITOR->pendingFrame = false;
if (*PDEBUGOVERLAY == 1) {
const float µs = std::chrono::duration_cast<std::chrono::nanoseconds>(std::chrono::high_resolution_clock::now() - startRender).count() / 1000.f;
g_pDebugOverlay->renderData(PMONITOR, µs);