From b1debebf8fe20ded20ba27e871fd1a6a9de029e3 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Wed, 25 Oct 2006 01:10:20 +0300 Subject: [PATCH] mi: remove mi motion history This is now unneeded as we do motion history in the DIX. --- hw/xfree86/loader/misym.c | 2 -- mi/mipointer.c | 74 --------------------------------------- mi/mipointer.h | 8 ----- mi/mipointrst.h | 9 ----- 4 files changed, 93 deletions(-) diff --git a/hw/xfree86/loader/misym.c b/hw/xfree86/loader/misym.c index 3f959faa2..46d6a024d 100644 --- a/hw/xfree86/loader/misym.c +++ b/hw/xfree86/loader/misym.c @@ -191,8 +191,6 @@ _X_HIDDEN void *miLookupTab[] = { SYMFUNC(miSegregateChildren) SYMFUNC(miHookInitVisuals) SYMFUNC(miPointerAbsoluteCursor) - SYMFUNC(miPointerGetMotionEvents) - SYMFUNC(miPointerGetMotionBufferSize) SYMFUNC(miOverlayCopyUnderlay) SYMFUNC(miOverlaySetTransFunction) SYMFUNC(miOverlayCollectUnderlayRegions) diff --git a/mi/mipointer.c b/mi/mipointer.c index 7f850adde..679b7602f 100644 --- a/mi/mipointer.c +++ b/mi/mipointer.c @@ -128,7 +128,6 @@ miPointerInitialize (pScreen, spriteFuncs, screenFuncs, waitForUpdate) miPointer.confined = FALSE; miPointer.x = 0; miPointer.y = 0; - miPointer.history_start = miPointer.history_end = 0; return TRUE; } @@ -267,39 +266,6 @@ miPointerWarpCursor (pScreen, x, y) * Pointer/CursorDisplay interface routines */ -_X_EXPORT int -miPointerGetMotionBufferSize () -{ - return MOTION_SIZE; -} - -_X_EXPORT int -miPointerGetMotionEvents (pPtr, coords, start, stop, pScreen) - DeviceIntPtr pPtr; - xTimecoord *coords; - unsigned long start, stop; - ScreenPtr pScreen; -{ - int i; - int count = 0; - miHistoryPtr h; - - for (i = miPointer.history_start; i != miPointer.history_end;) - { - h = &miPointer.history[i]; - if (h->event.time >= stop) - break; - if (h->event.time >= start) - { - *coords++ = h->event; - count++; - } - if (++i == MOTION_SIZE) i = 0; - } - return count; -} - - /* * miPointerUpdate * @@ -518,44 +484,4 @@ miPointerMoved (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y, if(!miPointer.pCursor->bits->emptyMask) (*pScreenPriv->spriteFuncs->MoveCursor) (pScreen, x, y); } - - miPointerUpdateHistory(pDev, pScreen, x, y, time); -} - -/* The pointer has moved to x, y; update the motion history. */ -void -miPointerUpdateHistory (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y, - unsigned long time) -{ - miHistoryPtr history; - int prev, end, start; - - miPointer.x = x; - miPointer.y = y; - miPointer.pScreen = pScreen; - - end = miPointer.history_end; - start = miPointer.history_start; - prev = end - 1; - if (end == 0) - prev = MOTION_SIZE - 1; - history = &miPointer.history[prev]; - if (end == start || history->event.time != time) - { - history = &miPointer.history[end]; - if (++end == MOTION_SIZE) - end = 0; - if (end == start) - { - start = end + 1; - if (start == MOTION_SIZE) - start = 0; - miPointer.history_start = start; - } - miPointer.history_end = end; - } - history->event.x = x; - history->event.y = y; - history->event.time = time; - history->pScreen = pScreen; } diff --git a/mi/mipointer.h b/mi/mipointer.h index 21b55fac7..30e89444b 100644 --- a/mi/mipointer.h +++ b/mi/mipointer.h @@ -181,14 +181,6 @@ extern void miPointerMoved( int y, unsigned long time); -/* Updates the event history. */ -extern void miPointerUpdateHistory( - DeviceIntPtr pDev, - ScreenPtr pScreen, - int x, - int y, - unsigned long time); - extern int miPointerScreenIndex; #endif /* MIPOINTER_H */ diff --git a/mi/mipointrst.h b/mi/mipointrst.h index 2ebf3278c..a80c52e7a 100644 --- a/mi/mipointrst.h +++ b/mi/mipointrst.h @@ -32,13 +32,6 @@ in this Software without prior written authorization from The Open Group. #include "mipointer.h" #include "scrnintstr.h" -#define MOTION_SIZE 256 - -typedef struct { - xTimecoord event; - ScreenPtr pScreen; -} miHistoryRec, *miHistoryPtr; - typedef struct { ScreenPtr pScreen; /* current screen */ ScreenPtr pSpriteScreen;/* screen containing current sprite */ @@ -48,8 +41,6 @@ typedef struct { Bool confined; /* pointer can't change screens */ int x, y; /* hot spot location */ int devx, devy; /* sprite position */ - miHistoryRec history[MOTION_SIZE]; - int history_start, history_end; } miPointerRec, *miPointerPtr; typedef struct {