mirror of
https://github.com/X11Libre/xf86-video-vmware.git
synced 2026-04-14 11:04:56 +00:00
vmwgfx: Fix dirty present bug
Clear dirty present areas when new contents are drawn to the backing pixmap. Not when it is actually pushed to the screen. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
This commit is contained in:
@@ -573,15 +573,11 @@ void xorg_flush(ScreenPtr pScreen)
|
||||
if (vpix->pending_update) {
|
||||
(void) vmwgfx_scanout_update(ms->fd, vpix->fb_id,
|
||||
vpix->pending_update);
|
||||
REGION_SUBTRACT(pScreen, vpix->dirty_present,
|
||||
vpix->dirty_present, vpix->pending_update);
|
||||
REGION_EMPTY(pScreen, vpix->pending_update);
|
||||
}
|
||||
if (vpix->pending_present) {
|
||||
(void) vmwgfx_scanout_present(pScreen, ms->fd, vpix,
|
||||
vpix->pending_present);
|
||||
REGION_SUBTRACT(pScreen, vpix->dirty_present,
|
||||
vpix->dirty_present, vpix->pending_present);
|
||||
REGION_EMPTY(pScreen, vpix->pending_present);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1054,6 +1054,8 @@ vmwgfx_dirty(struct saa_driver *driver, PixmapPtr pixmap,
|
||||
}
|
||||
REGION_UNION(vsaa->pScreen, vpix->pending_present,
|
||||
vpix->pending_present, damage);
|
||||
REGION_SUBTRACT(vsaa->pScreen, vpix->dirty_present,
|
||||
vpix->dirty_present, damage);
|
||||
}
|
||||
} else {
|
||||
if (REGION_NOTEMPTY(vsaa->pScreen, vpix->pending_present)) {
|
||||
@@ -1068,6 +1070,8 @@ vmwgfx_dirty(struct saa_driver *driver, PixmapPtr pixmap,
|
||||
}
|
||||
REGION_UNION(vsaa->pScreen, vpix->pending_update,
|
||||
vpix->pending_update, damage);
|
||||
REGION_SUBTRACT(vsaa->pScreen, vpix->dirty_present,
|
||||
vpix->dirty_present, damage);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
||||
Reference in New Issue
Block a user