Fix VRAM memory leak when releasing snapshots

This commit is contained in:
vaxerski 2022-07-12 23:11:34 +02:00
parent f9985a36b3
commit bf762f566f
6 changed files with 29 additions and 17 deletions

View file

@ -186,7 +186,6 @@ void Events::listener_monitorFrame(void* owner, void* data) {
if (PMONITOR->ID == pMostHzMonitor->ID || !*PNOVFR) { // unfortunately with VFR we don't have the guarantee mostHz is going to be updated all the time, so we have to ignore that
g_pCompositor->sanityCheckWorkspaces();
g_pAnimationManager->tick();
g_pCompositor->cleanupFadingOut();
HyprCtl::tickHyprCtl(); // so that we dont get that race condition multithread bullshit
@ -229,6 +228,9 @@ void Events::listener_monitorFrame(void* owner, void* data) {
return;
}
// we need to cleanup fading out when rendering the appropriate context
g_pCompositor->cleanupFadingOut(PMONITOR->ID);
if (!hasChanged && *PDAMAGETRACKINGMODE != DAMAGE_TRACKING_NONE && PMONITOR->forceFullFrames == 0 && damageBlinkCleanup == 0) {
pixman_region32_fini(&damage);
wlr_output_rollback(PMONITOR->output);