mirror of
https://github.com/X11Libre/xserver.git
synced 2026-10-01 22:03:09 +00:00
Change the devPrivates API to require dixRegisterPrivateKey
This patch only changes the API, not the implementation of the devPrivates infrastructure. This will permit a new devPrivates implementation to be layed into the server without requiring simultaneous changes in every devPrivates user. Signed-off-by: Keith Packard <keithp@keithp.com> Tested-by: Tiago Vignatti <tiago.vignatti@nokia.com>
This commit is contained in:
parent
c865a24401
commit
faeebead7b
139 changed files with 1105 additions and 711 deletions
9
dix/gc.c
9
dix/gc.c
|
|
@ -479,7 +479,7 @@ CreateGC(DrawablePtr pDrawable, BITS32 mask, XID *pval, int *pStatus,
|
|||
{
|
||||
GCPtr pGC;
|
||||
|
||||
pGC = malloc(sizeof(GC));
|
||||
pGC = dixAllocateObjectWithPrivates(GC, PRIVATE_GC);
|
||||
if (!pGC)
|
||||
{
|
||||
*pStatus = BadAlloc;
|
||||
|
|
@ -492,7 +492,6 @@ CreateGC(DrawablePtr pDrawable, BITS32 mask, XID *pval, int *pStatus,
|
|||
pGC->planemask = ~0;
|
||||
pGC->serialNumber = GC_CHANGE_SERIAL_BIT;
|
||||
pGC->funcs = 0;
|
||||
pGC->devPrivates = NULL;
|
||||
pGC->fgPixel = 0;
|
||||
pGC->bgPixel = 1;
|
||||
pGC->lineWidth = 0;
|
||||
|
|
@ -785,8 +784,7 @@ FreeGC(pointer value, XID gid)
|
|||
(*pGC->funcs->DestroyGC) (pGC);
|
||||
if (pGC->dash != DefaultDash)
|
||||
free(pGC->dash);
|
||||
dixFreePrivates(pGC->devPrivates);
|
||||
free(pGC);
|
||||
dixFreeObjectWithPrivates(pGC, PRIVATE_GC);
|
||||
return(Success);
|
||||
}
|
||||
|
||||
|
|
@ -808,7 +806,7 @@ CreateScratchGC(ScreenPtr pScreen, unsigned depth)
|
|||
{
|
||||
GCPtr pGC;
|
||||
|
||||
pGC = malloc(sizeof(GC));
|
||||
pGC = dixAllocateObjectWithPrivates(GC, PRIVATE_GC);
|
||||
if (!pGC)
|
||||
return (GCPtr)NULL;
|
||||
|
||||
|
|
@ -817,7 +815,6 @@ CreateScratchGC(ScreenPtr pScreen, unsigned depth)
|
|||
pGC->alu = GXcopy; /* dst <- src */
|
||||
pGC->planemask = ~0;
|
||||
pGC->serialNumber = 0;
|
||||
pGC->devPrivates = NULL;
|
||||
pGC->fgPixel = 0;
|
||||
pGC->bgPixel = 1;
|
||||
pGC->lineWidth = 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue