aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/fb
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-07-06 09:12:35 +0200
committermarha <marha@users.sourceforge.net>2012-07-06 09:13:41 +0200
commit336bad93d146931c160d8517edfdf0bee49ad9f7 (patch)
treed0fbdb5a716e78aa6318c7ddd49bd3e09e13379f /xorg-server/fb
parentfc8f37239f3af088819c18f5632b2608954af73a (diff)
downloadvcxsrv-336bad93d146931c160d8517edfdf0bee49ad9f7.tar.gz
vcxsrv-336bad93d146931c160d8517edfdf0bee49ad9f7.tar.bz2
vcxsrv-336bad93d146931c160d8517edfdf0bee49ad9f7.zip
randrproto fontconfig mesa xserver git update 6 Jul 2012
Diffstat (limited to 'xorg-server/fb')
-rw-r--r--xorg-server/fb/fb.h23
-rw-r--r--xorg-server/fb/fballpriv.c29
-rw-r--r--xorg-server/fb/fboverlay.c4
-rw-r--r--xorg-server/fb/fbscreen.c4
-rw-r--r--xorg-server/fb/fbwindow.c2
-rw-r--r--xorg-server/fb/wfbrename.h4
6 files changed, 25 insertions, 41 deletions
diff --git a/xorg-server/fb/fb.h b/xorg-server/fb/fb.h
index cc3b6ee61..40a7e38db 100644
--- a/xorg-server/fb/fb.h
+++ b/xorg-server/fb/fb.h
@@ -570,12 +570,6 @@ extern _X_EXPORT void fbSetBits(FbStip * bits, int stride, FbStip data);
} \
}
-extern _X_EXPORT DevPrivateKey
- fbGetGCPrivateKey(void);
-
-extern _X_EXPORT DevPrivateKey
- fbGetWinPrivateKey(void);
-
extern _X_EXPORT const GCOps fbGCOps;
extern _X_EXPORT const GCFuncs fbGCFuncs;
@@ -605,7 +599,7 @@ typedef void (*FinishWrapProcPtr) (DrawablePtr pDraw);
#endif
extern _X_EXPORT DevPrivateKey
- fbGetScreenPrivateKey(void);
+fbGetScreenPrivateKey(void);
/* private field of a screen */
typedef struct {
@@ -615,6 +609,8 @@ typedef struct {
SetupWrapProcPtr setupWrap; /* driver hook to set pixmap access wrapping */
FinishWrapProcPtr finishWrap; /* driver hook to clean up pixmap access wrapping */
#endif
+ DevPrivateKeyRec gcPrivateKeyRec;
+ DevPrivateKeyRec winPrivateKeyRec;
} FbScreenPrivRec, *FbScreenPrivPtr;
#define fbGetScreenPrivate(pScreen) ((FbScreenPrivPtr) \
@@ -630,8 +626,10 @@ typedef struct {
unsigned char bpp; /* current drawable bpp */
} FbGCPrivRec, *FbGCPrivPtr;
+#define fbGetGCPrivateKey(pGC) (&fbGetScreenPrivate((pGC)->pScreen)->gcPrivateKeyRec)
+
#define fbGetGCPrivate(pGC) ((FbGCPrivPtr)\
- dixLookupPrivate(&(pGC)->devPrivates, fbGetGCPrivateKey()))
+ dixLookupPrivate(&(pGC)->devPrivates, fbGetGCPrivateKey(pGC)))
#define fbGetCompositeClip(pGC) ((pGC)->pCompositeClip)
#define fbGetExpose(pGC) ((pGC)->fExpose)
@@ -639,8 +637,11 @@ typedef struct {
#define fbGetRotatedPixmap(pGC) ((pGC)->pRotatedPixmap)
#define fbGetScreenPixmap(s) ((PixmapPtr) (s)->devPrivate)
+
+#define fbGetWinPrivateKey(pWin) (&fbGetScreenPrivate(((DrawablePtr) (pWin))->pScreen)->winPrivateKeyRec)
+
#define fbGetWindowPixmap(pWin) ((PixmapPtr)\
- dixLookupPrivate(&((WindowPtr)(pWin))->devPrivates, fbGetWinPrivateKey()))
+ dixLookupPrivate(&((WindowPtr)(pWin))->devPrivates, fbGetWinPrivateKey(pWin)))
#ifdef ROOTLESS
#define __fbPixDrawableX(pPix) ((pPix)->drawable.x)
@@ -782,14 +783,14 @@ fb24_32ModifyPixmapHeader(PixmapPtr pPixmap,
* fballpriv.c
*/
extern _X_EXPORT Bool
- fbAllocatePrivates(ScreenPtr pScreen, DevPrivateKey *pGCIndex);
+fbAllocatePrivates(ScreenPtr pScreen);
/*
* fbarc.c
*/
extern _X_EXPORT void
- fbPolyArc(DrawablePtr pDrawable, GCPtr pGC, int narcs, xArc * parcs);
+fbPolyArc(DrawablePtr pDrawable, GCPtr pGC, int narcs, xArc * parcs);
/*
* fbbits.c
diff --git a/xorg-server/fb/fballpriv.c b/xorg-server/fb/fballpriv.c
index c6504f915..187d0b068 100644
--- a/xorg-server/fb/fballpriv.c
+++ b/xorg-server/fb/fballpriv.c
@@ -33,33 +33,20 @@ fbGetScreenPrivateKey(void)
return &fbScreenPrivateKeyRec;
}
-static DevPrivateKeyRec fbGCPrivateKeyRec;
-DevPrivateKey
-fbGetGCPrivateKey(void)
-{
- return &fbGCPrivateKeyRec;
-}
-
-static DevPrivateKeyRec fbWinPrivateKeyRec;
-DevPrivateKey
-fbGetWinPrivateKey(void)
-{
- return &fbWinPrivateKeyRec;
-}
-
Bool
-fbAllocatePrivates(ScreenPtr pScreen, DevPrivateKey *pGCKey)
+fbAllocatePrivates(ScreenPtr pScreen)
{
- if (pGCKey)
- *pGCKey = &fbGCPrivateKeyRec;
+ FbScreenPrivPtr pScrPriv;
if (!dixRegisterPrivateKey
- (&fbGCPrivateKeyRec, PRIVATE_GC, sizeof(FbGCPrivRec)))
- return FALSE;
- if (!dixRegisterPrivateKey
(&fbScreenPrivateKeyRec, PRIVATE_SCREEN, sizeof(FbScreenPrivRec)))
return FALSE;
- if (!dixRegisterPrivateKey(&fbWinPrivateKeyRec, PRIVATE_WINDOW, 0))
+
+ pScrPriv = fbGetScreenPrivate(pScreen);
+
+ if (!dixRegisterScreenSpecificPrivateKey (pScreen, &pScrPriv->gcPrivateKeyRec, PRIVATE_GC, sizeof(FbGCPrivRec)))
+ return FALSE;
+ if (!dixRegisterScreenSpecificPrivateKey (pScreen, &pScrPriv->winPrivateKeyRec, PRIVATE_WINDOW, 0))
return FALSE;
return TRUE;
diff --git a/xorg-server/fb/fboverlay.c b/xorg-server/fb/fboverlay.c
index a882ffa39..c6802e4b4 100644
--- a/xorg-server/fb/fboverlay.c
+++ b/xorg-server/fb/fboverlay.c
@@ -63,7 +63,7 @@ fbOverlayCreateWindow(WindowPtr pWin)
for (i = 0; i < pScrPriv->nlayers; i++) {
pPixmap = pScrPriv->layer[i].u.run.pixmap;
if (pWin->drawable.depth == pPixmap->drawable.depth) {
- dixSetPrivate(&pWin->devPrivates, fbGetWinPrivateKey(), pPixmap);
+ dixSetPrivate(&pWin->devPrivates, fbGetWinPrivateKey(pWin), pPixmap);
/*
* Make sure layer keys are written correctly by
* having non-root layers set to full while the
@@ -103,7 +103,7 @@ fbOverlayWindowLayer(WindowPtr pWin)
int i;
for (i = 0; i < pScrPriv->nlayers; i++)
- if (dixLookupPrivate(&pWin->devPrivates, fbGetWinPrivateKey()) ==
+ if (dixLookupPrivate(&pWin->devPrivates, fbGetWinPrivateKey(pWin)) ==
(pointer) pScrPriv->layer[i].u.run.pixmap)
return i;
return 0;
diff --git a/xorg-server/fb/fbscreen.c b/xorg-server/fb/fbscreen.c
index 0833cd41e..7c7d6560e 100644
--- a/xorg-server/fb/fbscreen.c
+++ b/xorg-server/fb/fbscreen.c
@@ -85,7 +85,7 @@ _fbGetWindowPixmap(WindowPtr pWindow)
void
_fbSetWindowPixmap(WindowPtr pWindow, PixmapPtr pPixmap)
{
- dixSetPrivate(&pWindow->devPrivates, fbGetWinPrivateKey(), pPixmap);
+ dixSetPrivate(&pWindow->devPrivates, fbGetWinPrivateKey(pWindow), pPixmap);
}
Bool
@@ -95,7 +95,7 @@ fbSetupScreen(ScreenPtr pScreen, pointer pbits, /* pointer to screen bitmap */
int dpiy, int width, /* pixel width of frame buffer */
int bpp)
{ /* bits per pixel for screen */
- if (!fbAllocatePrivates(pScreen, NULL))
+ if (!fbAllocatePrivates(pScreen))
return FALSE;
pScreen->defColormap = FakeClientID(0);
/* let CreateDefColormap do whatever it wants for pixels */
diff --git a/xorg-server/fb/fbwindow.c b/xorg-server/fb/fbwindow.c
index d27ccd4d5..368c4b883 100644
--- a/xorg-server/fb/fbwindow.c
+++ b/xorg-server/fb/fbwindow.c
@@ -31,7 +31,7 @@
Bool
fbCreateWindow(WindowPtr pWin)
{
- dixSetPrivate(&pWin->devPrivates, fbGetWinPrivateKey(),
+ dixSetPrivate(&pWin->devPrivates, fbGetWinPrivateKey(pWin),
fbGetScreenPixmap(pWin->drawable.pScreen));
if (pWin->drawable.bitsPerPixel == 32)
pWin->drawable.bitsPerPixel =
diff --git a/xorg-server/fb/wfbrename.h b/xorg-server/fb/wfbrename.h
index 8b896eb9a..588440c2b 100644
--- a/xorg-server/fb/wfbrename.h
+++ b/xorg-server/fb/wfbrename.h
@@ -69,15 +69,11 @@
#define fbFixCoordModePrevious wfbFixCoordModePrevious
#define fbGCFuncs wfbGCFuncs
#define fbGCOps wfbGCOps
-#define fbGCPrivateKeyRec wfbGCPrivateKeyRec
#define fbGeneration wfbGeneration
-#define fbGetGCPrivateKey wfbGetGCPrivateKey
#define fbGetImage wfbGetImage
#define fbGetScreenPrivateKey wfbGetScreenPrivateKey
#define fbGetSpans wfbGetSpans
#define _fbGetWindowPixmap _wfbGetWindowPixmap
-#define fbWinPrivateKeyRec wfbWinPrivateKeyRec
-#define fbGetWinPrivateKey wfbGetWinPrivateKey
#define fbGlyph16 wfbGlyph16
#define fbGlyph24 wfbGlyph24
#define fbGlyph32 wfbGlyph32