diff options
author | Eamon Walsh <ewalsh@tycho.nsa.gov> | 2007-08-28 09:28:25 -0400 |
---|---|---|
committer | Eamon Walsh <ewalsh@moss-charon.epoch.ncsc.mil> | 2007-08-28 09:28:25 -0400 |
commit | 4017d3190234e189a0bbd33193a148d4d3c7556b (patch) | |
tree | 2ab228113d410386afde50c893f137d95974b8f3 /mfb/mfbbitblt.c | |
parent | 85547073265ae9bc4ae3af920a6d3214fd1ca0c5 (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 'mfb/mfbbitblt.c')
-rw-r--r-- | mfb/mfbbitblt.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/mfb/mfbbitblt.c b/mfb/mfbbitblt.c index 270fd96a7..3efee45b1 100644 --- a/mfb/mfbbitblt.c +++ b/mfb/mfbbitblt.c @@ -397,8 +397,7 @@ int dstx, dsty; * must register a function for n-to-1 copy operations */ -static unsigned long copyPlaneGeneration; -static int copyPlaneScreenIndex = -1; +static DevPrivateKey copyPlaneScreenKey = ©PlaneScreenKey; typedef RegionPtr (*CopyPlaneFuncPtr)( DrawablePtr /* pSrcDrawable */, @@ -417,14 +416,7 @@ mfbRegisterCopyPlaneProc (pScreen, proc) ScreenPtr pScreen; CopyPlaneFuncPtr proc; { - if (copyPlaneGeneration != serverGeneration) - { - copyPlaneScreenIndex = AllocateScreenPrivateIndex(); - if (copyPlaneScreenIndex < 0) - return FALSE; - copyPlaneGeneration = serverGeneration; - } - pScreen->devPrivates[copyPlaneScreenIndex].fptr = (CopyPlaneFuncPtr)proc; + dixSetPrivate(&pScreen->devPrivates, copyPlaneScreenKey, proc); return TRUE; } @@ -469,9 +461,9 @@ unsigned long plane; if (pSrcDrawable->depth != 1) { - if (copyPlaneScreenIndex >= 0 && - (copyPlane = (CopyPlaneFuncPtr) - pSrcDrawable->pScreen->devPrivates[copyPlaneScreenIndex].fptr) + if ((copyPlane = (CopyPlaneFuncPtr) + dixLookupPrivate(&pSrcDrawable->pScreen->devPrivates, + copyPlaneScreenKey)) ) { return (*copyPlane) (pSrcDrawable, pDstDrawable, |