summaryrefslogtreecommitdiff
path: root/mi/miscrinit.c
diff options
context:
space:
mode:
authorEamon Walsh <ewalsh@tycho.nsa.gov>2007-08-28 09:28:25 -0400
committerEamon Walsh <ewalsh@moss-charon.epoch.ncsc.mil>2007-08-28 09:28:25 -0400
commit4017d3190234e189a0bbd33193a148d4d3c7556b (patch)
tree2ab228113d410386afde50c893f137d95974b8f3 /mi/miscrinit.c
parent85547073265ae9bc4ae3af920a6d3214fd1ca0c5 (diff)
devPrivates rework: since API is already broken, switch everything
over to new system. Need to update documentation and address some remaining vestiges of old system such as CursorRec structure, fb "offman" structure, and FontRec privates.
Diffstat (limited to 'mi/miscrinit.c')
-rw-r--r--mi/miscrinit.c25
1 files changed, 6 insertions, 19 deletions
diff --git a/mi/miscrinit.c b/mi/miscrinit.c
index cc40cbede..2dd8cd955 100644
--- a/mi/miscrinit.c
+++ b/mi/miscrinit.c
@@ -293,35 +293,22 @@ miScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width,
return miScreenDevPrivateInit(pScreen, width, pbits);
}
-_X_EXPORT int
+static DevPrivateKey privateKey = &privateKey;
+
+_X_EXPORT DevPrivateKey
miAllocateGCPrivateIndex()
{
- static int privateIndex = -1;
- static unsigned long miGeneration = 0;
-
- if (miGeneration != serverGeneration)
- {
- privateIndex = AllocateGCPrivateIndex();
- miGeneration = serverGeneration;
- }
- return privateIndex;
+ return privateKey;
}
-_X_EXPORT int miZeroLineScreenIndex;
-static unsigned int miZeroLineGeneration = 0;
+_X_EXPORT DevPrivateKey miZeroLineScreenKey;
_X_EXPORT void
miSetZeroLineBias(pScreen, bias)
ScreenPtr pScreen;
unsigned int bias;
{
- if (miZeroLineGeneration != serverGeneration)
- {
- miZeroLineScreenIndex = AllocateScreenPrivateIndex();
- miZeroLineGeneration = serverGeneration;
- }
- if (miZeroLineScreenIndex >= 0)
- pScreen->devPrivates[miZeroLineScreenIndex].uval = bias;
+ dixSetPrivate(&pScreen->devPrivates, miZeroLineScreenKey, (pointer)bias);
}
_X_EXPORT PixmapPtr