summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaetan Nadon <memsize@videotron.ca>2013-10-28 22:21:29 (GMT)
committerJakob Bornecrantz <jakob@vmware.com>2013-11-18 14:46:39 (GMT)
commite26dec8f5278df74a102493bf6d2d8444dab5d6d (patch)
treee1a0411fd63374f3fa4e8d786309c7d0e9c60cc7
parent45b2457516a9db4bd1d60fbb24a1efbe2d9dd932 (diff)
vmwgfx: handle changes of DamageUnregister API in 1.14.99.2
Fix is inspired from the intel driver. Reviewed-by: Jakob Bornecrantz <jakob@vmware.com> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
-rw-r--r--vmwgfx/vmwgfx_saa.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/vmwgfx/vmwgfx_saa.c b/vmwgfx/vmwgfx_saa.c
index fd80682..346e7f4 100644
--- a/vmwgfx/vmwgfx_saa.c
+++ b/vmwgfx/vmwgfx_saa.c
@@ -26,6 +26,7 @@
*/
#include <xorg-server.h>
+#include <xorgVersion.h>
#include <mi.h>
#include <fb.h>
#include <xf86drmMode.h>
@@ -76,7 +77,12 @@ vmwgfx_pixmap_remove_damage(PixmapPtr pixmap)
if (!spix->damage || vpix->hw || vpix->gmr || vpix->malloc)
return;
+#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,14,99,2,0)
+ DamageUnregister(spix->damage);
+#else
DamageUnregister(&pixmap->drawable, spix->damage);
+#endif
+
DamageDestroy(spix->damage);
spix->damage = NULL;
}