From: Hyun Kwon <hyun.k...@xilinx.com>

There is cursor bleeding for the devices which try to accelerate the
Desktop environment using low powered ARM Mali GPUs. The area under
the cusrsor is not updated for every swap call within the armsoc,
resulting in the block artifact.

Expose miDCSaveUnderCursor2 API, so that other graphics layer like
armsoc can invoke and save the area under the cursor before actually
performing a swap between the backbuffer and the frontbuffer.

-----
Changes in v2:
1. Aligned indentation
2. Addressed the comments mentioned for better readability
----

Signed-off-by: Hyun Kwon <hyun.k...@xilinx.com>
Signed-off-by: Madhurkiran Harikrishnan <madhurkiran.harikrish...@xilinx.com>
---
 mi/mipointer.h |  2 ++
 mi/misprite.c  | 17 +++++++++++++++++
 2 files changed, 19 insertions(+)

diff --git a/mi/mipointer.h b/mi/mipointer.h
index 7ce6409..107b24f 100644
--- a/mi/mipointer.h
+++ b/mi/mipointer.h
@@ -127,4 +127,6 @@ extern _X_EXPORT DevPrivateKeyRec miPointerScreenKeyRec;
 
 #define miPointerScreenKey (&miPointerScreenKeyRec)
 
+extern _X_EXPORT void miDCSaveUnderCursor2(ScreenPtr pScreen);
+
 #endif                          /* MIPOINTER_H */
diff --git a/mi/misprite.c b/mi/misprite.c
index add2c55..5ce7566 100644
--- a/mi/misprite.c
+++ b/mi/misprite.c
@@ -955,3 +955,20 @@ miSpriteComputeSaved(DeviceIntPtr pDev, ScreenPtr pScreen)
     pCursorInfo->saved.x2 = pCursorInfo->saved.x1 + w + wpad * 2;
     pCursorInfo->saved.y2 = pCursorInfo->saved.y1 + h + hpad * 2;
 }
+
+void
+miDCSaveUnderCursor2(ScreenPtr pScreen)
+{
+    DeviceIntPtr pDev;
+    miCursorInfoPtr pCursorInfo;
+
+    for (pDev = inputInfo.devices; pDev; pDev = pDev->next) {
+        if (!DevHasCursor(pDev)) continue;
+
+       pCursorInfo = GetSprite(pDev);
+
+       if (!pCursorInfo) continue;
+       if (pCursorInfo->isUp && pCursorInfo->pScreen == pScreen)
+          miSpriteSaveUnderCursor(pDev, pScreen);
+    }
+}
-- 
2.7.4

_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to