diff options
author | Keith Packard <keithp@keithp.com> | 2013-11-26 12:18:12 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2013-12-05 09:51:00 -0800 |
commit | 653d33941b0808ef910aaa5f3aeab05d9c1a100b (patch) | |
tree | 9120a1e4185eb5dbb311543414b4f2103a92ecbb /present | |
parent | 5cf12c9569ac3d83fe1b7a8376c15f8f0b01655e (diff) |
present: Report damage when flipping
Limit damage to the 'update' region.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'present')
-rw-r--r-- | present/present.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/present/present.c b/present/present.c index 251931a06..ffbb0b370 100644 --- a/present/present.c +++ b/present/present.c @@ -520,6 +520,7 @@ present_execute(present_vblank_ptr vblank, uint64_t ust, uint64_t crtc_msc) /* Try to flip */ if (present_flip(vblank->crtc, vblank->event_id, vblank->target_msc, vblank->pixmap, vblank->sync_flip)) { + RegionPtr damage; /* Fix window pixmaps: * 1) Restore previous flip window pixmap @@ -530,6 +531,16 @@ present_execute(present_vblank_ptr vblank, uint64_t ust, uint64_t crtc_msc) (*screen->GetScreenPixmap)(screen)); (*screen->SetWindowPixmap)(vblank->window, vblank->pixmap); (*screen->SetWindowPixmap)(screen->root, vblank->pixmap); + + /* Report update region as damaged + */ + if (vblank->update) { + damage = vblank->update; + RegionIntersect(damage, damage, &window->clipList); + } else + damage = &window->clipList; + + DamageDamageRegion(&vblank->window->drawable, damage); return; } |