forked from e16/e16
1
0
Fork 0

FX: Fix cleanup with compositing enabled

This commit is contained in:
Kim Woelders 2021-05-05 20:01:03 +02:00
parent 726bb9ea13
commit 34d1de3984
3 changed files with 18 additions and 0 deletions

View File

@ -431,6 +431,19 @@ ECompMgrDamageAll(void)
ECompMgrDamageMerge(Mode_compmgr.rgn_screen);
}
void
ECompMgrDamageArea(int x, int y, int w, int h)
{
EX_SrvRegion rgn;
if (!Mode_compmgr.active)
return;
rgn = Mode_compmgr.rgn_tmp2;
ERegionSetRect(rgn, x, y, w, h);
ECompMgrDamageMerge(rgn);
}
#if ENABLE_SHADOWS
#define M_2PI_F ((float)(2 * M_PI))

View File

@ -70,6 +70,8 @@ int ECompMgrRender(int dt);
EX_Window ECompMgrRootWin(void);
void ECompMgrDamageArea(int x, int y, int w, int h);
EX_SrvRegion ECompMgrChildClipRegion(void);
#else

View File

@ -107,6 +107,9 @@ _FxCleanup(FXData * d, int h)
EXFreeGC(d->gc1);
EClearArea(d->win, 0, WinGetH(VROOT) - h, WinGetW(VROOT), h);
#if USE_COMPOSITE
ECompMgrDamageArea(0, WinGetH(VROOT) - h, WinGetW(VROOT), h);
#endif
}
}