From 26fef81ed8e28ff33f137c48d96a0840a81ad42e Mon Sep 17 00:00:00 2001 From: Jeffy Chen Date: Fri, 28 Jun 2019 17:27:16 +0800 Subject: [PATCH] glamor: xv: Fix sw cursor rendering issue When reporting damage, the misprite swcursor will try to remove cursor by restoring the under cursor area. This will override the previous draw, so we need to move it before the rendering. Signed-off-by: Jeffy Chen --- glamor/glamor_xv.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/glamor/glamor_xv.c b/glamor/glamor_xv.c index 328769ab1..aeff7454b 100644 --- a/glamor/glamor_xv.c +++ b/glamor/glamor_xv.c @@ -430,6 +430,8 @@ glamor_xv_render(glamor_port_private *port_priv, int id) char *vbo_offset; int dst_box_index; + DamageRegionAppend(port_priv->pDraw, &port_priv->clip); + if (!port_priv->xv_prog.prog) glamor_init_xv_shader(screen, port_priv, id); @@ -608,7 +610,7 @@ glamor_xv_render(glamor_port_private *port_priv, int id) glDisableVertexAttribArray(GLAMOR_VERTEX_POS); glDisableVertexAttribArray(GLAMOR_VERTEX_SOURCE); - DamageDamageRegion(port_priv->pDraw, &port_priv->clip); + DamageRegionProcessPending(port_priv->pDraw); } static Bool