mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-08-09 20:24:14 +00:00
[client] egl: use new EGL damage count semantics
After the damage queue PR, EGL damage count 0 means no change, and -1 means invalidate the entire window. However, several other places have different semantics, and we are not handling them correctly: 1. KVMFR uses 0 to signal invalidating the entire frame, so if we receive 0 rectangles in egl_on_frame, we should set damage count to -1. 2. The damage overlay treated 0 as full damage, which is now incorrect. This is fixed, and now it treats 0 as no update, and -1 as full damage.
This commit is contained in:
@@ -514,7 +514,8 @@ static bool egl_on_frame(void * opaque, const FrameBuffer * frame, int dmaFd,
|
||||
|
||||
INTERLOCKED_SECTION(this->desktopDamageLock, {
|
||||
struct DesktopDamage * damage = this->desktopDamage + this->desktopDamageIdx;
|
||||
if (damage->count == -1 || damage->count + damageRectsCount >= KVMFR_MAX_DAMAGE_RECTS)
|
||||
if (damage->count == -1 || damageRectsCount == 0 ||
|
||||
damage->count + damageRectsCount >= KVMFR_MAX_DAMAGE_RECTS)
|
||||
damage->count = -1;
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user