From eda1f3df6aaed683036369fe8820da4dac3c2ae2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Thu, 1 Sep 2016 12:54:13 +0900 Subject: Synchronize scanout pixmaps for TearFree Copy the damaged areas which are still valid in the other scanout pixmap from there, then only copy the remaining damaged area from the screen pixmap. This is slightly more efficient (only needs one Damage record instead of two, and only needs to copy each screen update across PCIe once with ShadowPrimary and a discrete GPU), and will be significantly more efficient for PRIME with the following change. Reviewed-by: Alex Deucher --- src/drmmode_display.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/drmmode_display.h') diff --git a/src/drmmode_display.h b/src/drmmode_display.h index 53c79268..5df9773d 100644 --- a/src/drmmode_display.h +++ b/src/drmmode_display.h @@ -73,7 +73,6 @@ typedef struct { struct drmmode_scanout { struct radeon_bo *bo; PixmapPtr pixmap; - DamagePtr damage; unsigned fb_id; int width, height; }; @@ -85,6 +84,8 @@ typedef struct { struct radeon_bo *cursor_bo; struct drmmode_scanout rotate; struct drmmode_scanout scanout[2]; + DamagePtr scanout_damage; + RegionRec scanout_last_region; unsigned scanout_id; Bool scanout_update_pending; int dpms_mode; -- cgit v1.2.3