Commit 6b0a1738 authored by Ulrich Sibiller's avatar Ulrich Sibiller Committed by Mihai Moldovan

Lift mi to xorg-xserver-7.1/1.1.0 state

I left out glx changes to miinitext.c for now.
parent 23dd2959
...@@ -504,7 +504,7 @@ int what; ...@@ -504,7 +504,7 @@ int what;
BITS32 gcmask, index, mask; BITS32 gcmask, index, mask;
RegionRec prgnWin; RegionRec prgnWin;
DDXPointRec oldCorner; DDXPointRec oldCorner;
BoxRec box; BoxRec box = {0};
WindowPtr pBgWin; WindowPtr pBgWin;
GCPtr pGC; GCPtr pGC;
register int i; register int i;
...@@ -566,8 +566,7 @@ int what; ...@@ -566,8 +566,7 @@ int what;
} }
} }
prect = (xRectangle *)malloc(RegionNumRects(prgn) * prect = (xRectangle *)calloc(RegionNumRects(prgn), sizeof(xRectangle));
sizeof(xRectangle));
if (!prect) if (!prect)
return; return;
......
...@@ -134,16 +134,6 @@ extern void miPutImage( ...@@ -134,16 +134,6 @@ extern void miPutImage(
char * /*pImage*/ char * /*pImage*/
); );
/* miclipn.c */
extern void miClipNotify(
void (* /*func*/)(
WindowPtr /* pWin */,
int /* dx */,
int /* dy */
)
);
/* micursor.c */ /* micursor.c */
extern void miRecolorCursor( extern void miRecolorCursor(
......
...@@ -586,8 +586,10 @@ miDoInitVisuals(VisualPtr *visualp, DepthPtr *depthp, int *nvisualp, ...@@ -586,8 +586,10 @@ miDoInitVisuals(VisualPtr *visualp, DepthPtr *depthp, int *nvisualp,
if (nvtype) if (nvtype)
{ {
vid = (VisualID *) malloc (nvtype * sizeof (VisualID)); vid = (VisualID *) malloc (nvtype * sizeof (VisualID));
if (!vid) if (!vid) {
free(preferredCVCs);
return FALSE; return FALSE;
}
} }
depth->depth = d; depth->depth = d;
depth->numVids = nvtype; depth->numVids = nvtype;
......
...@@ -80,9 +80,6 @@ extern Bool noDamageExtension; ...@@ -80,9 +80,6 @@ extern Bool noDamageExtension;
#ifdef DBE #ifdef DBE
extern Bool noDbeExtension; extern Bool noDbeExtension;
#endif #endif
#ifdef DPSEXT
extern Bool noDPSExtension;
#endif
#ifdef DPMSExtension #ifdef DPMSExtension
extern Bool noDPMSExtension; extern Bool noDPMSExtension;
#endif #endif
...@@ -142,7 +139,6 @@ extern Bool noXIdleExtension; ...@@ -142,7 +139,6 @@ extern Bool noXIdleExtension;
extern Bool noXvExtension; extern Bool noXvExtension;
#endif #endif
#define INITARGS void
typedef void (*InitExtension)(void); typedef void (*InitExtension)(void);
#ifdef MITSHM #ifdef MITSHM
...@@ -228,6 +224,11 @@ extern void SecurityExtensionInit(void); ...@@ -228,6 +224,11 @@ extern void SecurityExtensionInit(void);
extern void XFree86BigfontExtensionInit(void); extern void XFree86BigfontExtensionInit(void);
#endif #endif
#ifdef GLXEXT #ifdef GLXEXT
/*
typedef struct __GLXprovider __GLXprovider;
extern __GLXprovider __glXMesaProvider;
extern void GlxPushProvider(__GLXprovider *impl);
*/
#ifndef __DARWIN__ #ifndef __DARWIN__
extern void GlxExtensionInit(void); extern void GlxExtensionInit(void);
extern void GlxWrapInitVisuals(miInitVisualsProcPtr *); extern void GlxWrapInitVisuals(miInitVisualsProcPtr *);
...@@ -290,9 +291,6 @@ static ExtensionToggle ExtensionToggleList[] = ...@@ -290,9 +291,6 @@ static ExtensionToggle ExtensionToggleList[] =
#ifdef DBE #ifdef DBE
{ "DOUBLE-BUFFER", &noDbeExtension }, { "DOUBLE-BUFFER", &noDbeExtension },
#endif #endif
#ifdef DPSEXT
{ "DPSExtension", &noDPSExtension },
#endif
#ifdef DPMSExtension #ifdef DPMSExtension
{ "DPMS", &noDPMSExtension }, { "DPMS", &noDPMSExtension },
#endif #endif
...@@ -447,6 +445,9 @@ InitExtensions(argc, argv) ...@@ -447,6 +445,9 @@ InitExtensions(argc, argv)
#endif #endif
#endif #endif
#ifdef GLXEXT #ifdef GLXEXT
/*
GlxPushProvider(&__glXMesaProvider);
*/
#ifndef __DARWIN__ #ifndef __DARWIN__
if (!noGlxExtension) GlxExtensionInit(); if (!noGlxExtension) GlxExtensionInit();
#else #else
......
...@@ -262,33 +262,7 @@ miScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width, ...@@ -262,33 +262,7 @@ miScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width,
/* CreateGC */ /* CreateGC */
/* CreateColormap, DestroyColormap, InstallColormap, UninstallColormap */ /* CreateColormap, DestroyColormap, InstallColormap, UninstallColormap */
/* ListInstalledColormaps, StoreColors, ResolveColor */ /* ListInstalledColormaps, StoreColors, ResolveColor */
#ifdef NEED_SCREEN_REGIONS
pScreen->RegionCreate = RegionCreate;
pScreen->RegionInit = RegionInit;
pScreen->RegionCopy = RegionCopy;
pScreen->RegionDestroy = RegionDestroy;
pScreen->RegionUninit = RegionUninit;
pScreen->Intersect = RegionIntersect;
pScreen->Union = RegionUnion;
pScreen->Subtract = RegionSubtract;
pScreen->Inverse = RegionInverse;
pScreen->RegionReset = RegionReset;
pScreen->TranslateRegion = RegionTranslate;
pScreen->RectIn = RegionContainsRect;
pScreen->PointInRegion = RegionContainsPoint;
pScreen->RegionNotEmpty = RegionNotEmpty;
pScreen->RegionEqual = RegionEqual;
pScreen->RegionBroken = RegionBroken;
pScreen->RegionBreak = RegionBreak;
pScreen->RegionEmpty = RegionEmpty;
pScreen->RegionExtents = RegionExtents;
pScreen->RegionAppend = RegionAppend;
pScreen->RegionValidate = RegionValidate;
#endif /* NEED_SCREEN_REGIONS */
/* BitmapToRegion */ /* BitmapToRegion */
#ifdef NEED_SCREEN_REGIONS
pScreen->RectsToRegion = RegionFromRects;
#endif /* NEED_SCREEN_REGIONS */
pScreen->SendGraphicsExpose = miSendGraphicsExpose; pScreen->SendGraphicsExpose = miSendGraphicsExpose;
pScreen->BlockHandler = (ScreenBlockHandlerProcPtr)NoopDDA; pScreen->BlockHandler = (ScreenBlockHandlerProcPtr)NoopDDA;
pScreen->WakeupHandler = (ScreenWakeupHandlerProcPtr)NoopDDA; pScreen->WakeupHandler = (ScreenWakeupHandlerProcPtr)NoopDDA;
......
...@@ -98,8 +98,8 @@ static void miSpriteComputeSaved(ScreenPtr pScreen); ...@@ -98,8 +98,8 @@ static void miSpriteComputeSaved(ScreenPtr pScreen);
((pScreen)->field = \ ((pScreen)->field = \
((miSpriteScreenPtr) (pScreen)->devPrivates[miSpriteScreenIndex].ptr)->field) ((miSpriteScreenPtr) (pScreen)->devPrivates[miSpriteScreenIndex].ptr)->field)
#define SCREEN_EPILOGUE(pScreen, field, wrapper)\ #define SCREEN_EPILOGUE(pScreen, field)\
((pScreen)->field = wrapper) ((pScreen)->field = miSprite##field)
/* /*
* void *-sprite method table * void *-sprite method table
...@@ -298,7 +298,7 @@ miSpriteGetImage (pDrawable, sx, sy, w, h, format, planemask, pdstLine) ...@@ -298,7 +298,7 @@ miSpriteGetImage (pDrawable, sx, sy, w, h, format, planemask, pdstLine)
(*pScreen->GetImage) (pDrawable, sx, sy, w, h, (*pScreen->GetImage) (pDrawable, sx, sy, w, h,
format, planemask, pdstLine); format, planemask, pdstLine);
SCREEN_EPILOGUE (pScreen, GetImage, miSpriteGetImage); SCREEN_EPILOGUE (pScreen, GetImage);
} }
static void static void
...@@ -344,7 +344,7 @@ miSpriteGetSpans (pDrawable, wMax, ppt, pwidth, nspans, pdstStart) ...@@ -344,7 +344,7 @@ miSpriteGetSpans (pDrawable, wMax, ppt, pwidth, nspans, pdstStart)
(*pScreen->GetSpans) (pDrawable, wMax, ppt, pwidth, nspans, pdstStart); (*pScreen->GetSpans) (pDrawable, wMax, ppt, pwidth, nspans, pdstStart);
SCREEN_EPILOGUE (pScreen, GetSpans, miSpriteGetSpans); SCREEN_EPILOGUE (pScreen, GetSpans);
} }
static void static void
...@@ -370,7 +370,7 @@ miSpriteSourceValidate (pDrawable, x, y, width, height) ...@@ -370,7 +370,7 @@ miSpriteSourceValidate (pDrawable, x, y, width, height)
if (pScreen->SourceValidate) if (pScreen->SourceValidate)
(*pScreen->SourceValidate) (pDrawable, x, y, width, height); (*pScreen->SourceValidate) (pDrawable, x, y, width, height);
SCREEN_EPILOGUE (pScreen, SourceValidate, miSpriteSourceValidate); SCREEN_EPILOGUE (pScreen, SourceValidate);
} }
static void static void
...@@ -393,7 +393,7 @@ miSpriteCopyWindow (WindowPtr pWindow, DDXPointRec ptOldOrg, RegionPtr prgnSrc) ...@@ -393,7 +393,7 @@ miSpriteCopyWindow (WindowPtr pWindow, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
} }
(*pScreen->CopyWindow) (pWindow, ptOldOrg, prgnSrc); (*pScreen->CopyWindow) (pWindow, ptOldOrg, prgnSrc);
SCREEN_EPILOGUE (pScreen, CopyWindow, miSpriteCopyWindow); SCREEN_EPILOGUE (pScreen, CopyWindow);
} }
static void static void
...@@ -412,7 +412,7 @@ miSpriteBlockHandler (i, blockData, pTimeout, pReadmask) ...@@ -412,7 +412,7 @@ miSpriteBlockHandler (i, blockData, pTimeout, pReadmask)
(*pScreen->BlockHandler) (i, blockData, pTimeout, pReadmask); (*pScreen->BlockHandler) (i, blockData, pTimeout, pReadmask);
SCREEN_EPILOGUE(pScreen, BlockHandler, miSpriteBlockHandler); SCREEN_EPILOGUE(pScreen, BlockHandler);
if (!pPriv->isUp && pPriv->shouldBeUp) if (!pPriv->isUp && pPriv->shouldBeUp)
{ {
...@@ -434,7 +434,7 @@ miSpriteInstallColormap (pMap) ...@@ -434,7 +434,7 @@ miSpriteInstallColormap (pMap)
(*pScreen->InstallColormap) (pMap); (*pScreen->InstallColormap) (pMap);
SCREEN_EPILOGUE(pScreen, InstallColormap, miSpriteInstallColormap); SCREEN_EPILOGUE(pScreen, InstallColormap);
pPriv->pInstalledMap = pMap; pPriv->pInstalledMap = pMap;
if (pPriv->pColormap != pMap) if (pPriv->pColormap != pMap)
...@@ -463,7 +463,7 @@ miSpriteStoreColors (pMap, ndef, pdef) ...@@ -463,7 +463,7 @@ miSpriteStoreColors (pMap, ndef, pdef)
(*pScreen->StoreColors) (pMap, ndef, pdef); (*pScreen->StoreColors) (pMap, ndef, pdef);
SCREEN_EPILOGUE(pScreen, StoreColors, miSpriteStoreColors); SCREEN_EPILOGUE(pScreen, StoreColors);
if (pPriv->pColormap == pMap) if (pPriv->pColormap == pMap)
{ {
...@@ -592,7 +592,7 @@ miSpriteSaveDoomedAreas (pWin, pObscured, dx, dy) ...@@ -592,7 +592,7 @@ miSpriteSaveDoomedAreas (pWin, pObscured, dx, dy)
(*pScreen->SaveDoomedAreas) (pWin, pObscured, dx, dy); (*pScreen->SaveDoomedAreas) (pWin, pObscured, dx, dy);
SCREEN_EPILOGUE (pScreen, SaveDoomedAreas, miSpriteSaveDoomedAreas); SCREEN_EPILOGUE (pScreen, SaveDoomedAreas);
} }
/* /*
......
...@@ -237,6 +237,18 @@ miComputeClips ( ...@@ -237,6 +237,18 @@ miComputeClips (
dy = 32767; dy = 32767;
borderSize.y2 = dy; borderSize.y2 = dy;
#ifdef COMPOSITE
/*
* In redirected drawing case, reset universe to borderSize
*/
if (pParent->redirectDraw)
{
if (miSetRedirectBorderClipProc)
(*miSetRedirectBorderClipProc) (pParent, universe);
RegionCopy(universe, &pParent->borderSize);
}
#endif
oldVis = pParent->visibility; oldVis = pParent->visibility;
switch (RegionContainsRect(universe, &borderSize)) switch (RegionContainsRect(universe, &borderSize))
{ {
...@@ -276,18 +288,6 @@ miComputeClips ( ...@@ -276,18 +288,6 @@ miComputeClips (
((pParent->eventMask | wOtherEventMasks(pParent)) & VisibilityChangeMask)) ((pParent->eventMask | wOtherEventMasks(pParent)) & VisibilityChangeMask))
SendVisibilityNotify(pParent); SendVisibilityNotify(pParent);
#ifdef COMPOSITE
/*
* In redirected drawing case, reset universe to borderSize
*/
if (pParent->redirectDraw)
{
if (miSetRedirectBorderClipProc)
(*miSetRedirectBorderClipProc) (pParent, universe);
RegionCopy(universe, &pParent->borderSize);
}
#endif
dx = pParent->drawable.x - pParent->valdata->before.oldAbsCorner.x; dx = pParent->drawable.x - pParent->valdata->before.oldAbsCorner.x;
dy = pParent->drawable.y - pParent->valdata->before.oldAbsCorner.y; dy = pParent->drawable.y - pParent->valdata->before.oldAbsCorner.y;
......
...@@ -119,7 +119,8 @@ miFillPolyHelper (pDrawable, pGC, pixel, spanData, y, overall_height, ...@@ -119,7 +119,8 @@ miFillPolyHelper (pDrawable, pGC, pixel, spanData, y, overall_height,
oldPixel = pGC->fgPixel; oldPixel = pGC->fgPixel;
if (pixel != oldPixel) if (pixel != oldPixel)
{ {
DoChangeGC (pGC, GCForeground, (XID *)&pixel, FALSE); XID tmpPixel = (XID)pixel;
DoChangeGC (pGC, GCForeground, &tmpPixel, FALSE);
ValidateGC (pDrawable, pGC); ValidateGC (pDrawable, pGC);
} }
} }
...@@ -217,7 +218,8 @@ miFillRectPolyHelper ( ...@@ -217,7 +218,8 @@ miFillRectPolyHelper (
oldPixel = pGC->fgPixel; oldPixel = pGC->fgPixel;
if (pixel != oldPixel) if (pixel != oldPixel)
{ {
DoChangeGC (pGC, GCForeground, (XID *)&pixel, FALSE); XID tmpPixel = (XID)pixel;
DoChangeGC (pGC, GCForeground, &tmpPixel, FALSE);
ValidateGC (pDrawable, pGC); ValidateGC (pDrawable, pGC);
} }
(*pGC->ops->PolyFillRect) (pDrawable, pGC, 1, &rect); (*pGC->ops->PolyFillRect) (pDrawable, pGC, 1, &rect);
...@@ -1068,7 +1070,8 @@ miLineArc ( ...@@ -1068,7 +1070,8 @@ miLineArc (
oldPixel = pGC->fgPixel; oldPixel = pGC->fgPixel;
if (pixel != oldPixel) if (pixel != oldPixel)
{ {
DoChangeGC(pGC, GCForeground, (XID *)&pixel, FALSE); XID tmpPixel = (XID)pixel;
DoChangeGC(pGC, GCForeground, &tmpPixel, FALSE);
ValidateGC (pDraw, pGC); ValidateGC (pDraw, pGC);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment