Commit 466b8b43 authored by Michel Dänzer's avatar Michel Dänzer Committed by Michel Dänzer
Browse files

present/wnmd: Translate update region to screen space



The region as passed in is in the source pixmap's coordinate space, so
intersecting it with the clipList (which is in screen space) resulted in
disappointment.

Fixes Firefox popups such as the hamburger menu when using the EGL
backend.

v2:
* Drop vblank->x/y_off from RegionTranslate call, since they're always
  0 here (present_wnmd_check_flip rejects flips for x/y_off != 0).
Reported-by: Robert Mader's avatarRobert Mader <robert.mader@posteo.de>
Tested-by: Robert Mader's avatarRobert Mader <robert.mader@posteo.de>
Reviewed-by: default avatarOlivier Fourdan <ofourdan@redhat.com>
Tested-by: Joakim Tjernlund <joakim.tjernlund@infinera.com> # v1
parent 3ce05a44
......@@ -459,10 +459,13 @@ present_wnmd_execute(present_vblank_ptr vblank, uint64_t ust, uint64_t crtc_msc)
/* Set update region as damaged */
if (vblank->update) {
damage = vblank->update;
damage = RegionDuplicate(vblank->update);
/* Translate update region to screen space */
assert(vblank->x_off == 0 && vblank->y_off == 0);
RegionTranslate(damage, window->drawable.x, window->drawable.y);
RegionIntersect(damage, damage, &window->clipList);
} else
damage = &window->clipList;
damage = RegionDuplicate(&window->clipList);
/* Try to flip - the vblank is now pending
*/
......@@ -484,6 +487,7 @@ present_wnmd_execute(present_vblank_ptr vblank, uint64_t ust, uint64_t crtc_msc)
/* Report damage */
DamageDamageRegion(&vblank->window->drawable, damage);
RegionDestroy(damage);
return;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment