[Mesa-dev] [PATCH] st/xorg: remove _modesettingRec.cursor
Marcin Slusarz
marcin.slusarz at gmail.com
Sun May 1 15:00:27 PDT 2011
It's not used for anything useful.
---
src/gallium/state_trackers/xorg/xorg_crtc.c | 13 -------------
src/gallium/state_trackers/xorg/xorg_driver.c | 5 -----
src/gallium/state_trackers/xorg/xorg_tracker.h | 1 -
3 files changed, 0 insertions(+), 19 deletions(-)
diff --git a/src/gallium/state_trackers/xorg/xorg_crtc.c b/src/gallium/state_trackers/xorg/xorg_crtc.c
index 8eaf414..b8d9474 100644
--- a/src/gallium/state_trackers/xorg/xorg_crtc.c
+++ b/src/gallium/state_trackers/xorg/xorg_crtc.c
@@ -302,21 +302,8 @@ err_bo_destroy:
static void
crtc_load_cursor_argb(xf86CrtcPtr crtc, CARD32 * image)
{
- xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(crtc->scrn);
modesettingPtr ms = modesettingPTR(crtc->scrn);
- /* Older X servers have cursor reference counting bugs leading to use of
- * freed memory and consequently random crashes. Should be fixed as of
- * xserver 1.8, but this workaround shouldn't hurt anyway.
- */
- if (config->cursor)
- config->cursor->refcnt++;
-
- if (ms->cursor)
- FreeCursor(ms->cursor, None);
-
- ms->cursor = config->cursor;
-
if (ms->screen)
crtc_load_cursor_argb_ga3d(crtc, image);
#ifdef HAVE_LIBKMS
diff --git a/src/gallium/state_trackers/xorg/xorg_driver.c b/src/gallium/state_trackers/xorg/xorg_driver.c
index 063ae92..e338f86 100644
--- a/src/gallium/state_trackers/xorg/xorg_driver.c
+++ b/src/gallium/state_trackers/xorg/xorg_driver.c
@@ -999,11 +999,6 @@ drv_close_screen(int scrnIndex, ScreenPtr pScreen)
modesettingPtr ms = modesettingPTR(pScrn);
CustomizerPtr cust = ms->cust;
- if (ms->cursor) {
- FreeCursor(ms->cursor, None);
- ms->cursor = NULL;
- }
-
if (cust && cust->winsys_screen_close)
cust->winsys_screen_close(cust);
diff --git a/src/gallium/state_trackers/xorg/xorg_tracker.h b/src/gallium/state_trackers/xorg/xorg_tracker.h
index 664e8c7..e345cd6 100644
--- a/src/gallium/state_trackers/xorg/xorg_tracker.h
+++ b/src/gallium/state_trackers/xorg/xorg_tracker.h
@@ -105,7 +105,6 @@ typedef struct _modesettingRec
Bool noAccel;
Bool SWCursor;
- CursorPtr cursor;
Bool swapThrottling;
Bool dirtyThrottling;
CloseScreenProcPtr CloseScreen;
--
1.7.4.1
More information about the mesa-dev
mailing list