summaryrefslogtreecommitdiff
path: root/render/picturestr.h
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 /render/picturestr.h
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 'render/picturestr.h')
-rw-r--r--render/picturestr.h42
1 files changed, 11 insertions, 31 deletions
diff --git a/render/picturestr.h b/render/picturestr.h
index 005c58808..aafe4e80a 100644
--- a/render/picturestr.h
+++ b/render/picturestr.h
@@ -27,6 +27,7 @@
#include "glyphstr.h"
#include "scrnintstr.h"
#include "resource.h"
+#include "privates.h"
typedef struct _DirectFormat {
CARD16 red, redMask;
@@ -173,7 +174,7 @@ typedef struct _Picture {
RegionPtr pCompositeClip;
- DevUnion *devPrivates;
+ PrivateRec *devPrivates;
PictTransform *transform;
@@ -328,10 +329,6 @@ typedef void (*UnrealizeGlyphProcPtr) (ScreenPtr pScreen,
GlyphPtr glyph);
typedef struct _PictureScreen {
- int totalPictureSize;
- unsigned int *PicturePrivateSizes;
- int PicturePrivateLen;
-
PictFormatPtr formats;
PictFormatPtr fallback;
int nformats;
@@ -389,30 +386,25 @@ typedef struct _PictureScreen {
AddTrapsProcPtr AddTraps;
- int totalGlyphPrivateSize;
- unsigned int *glyphPrivateSizes;
- int glyphPrivateLen;
- int glyphPrivateOffset;
-
RealizeGlyphProcPtr RealizeGlyph;
UnrealizeGlyphProcPtr UnrealizeGlyph;
} PictureScreenRec, *PictureScreenPtr;
-extern int PictureScreenPrivateIndex;
-extern int PictureWindowPrivateIndex;
+extern DevPrivateKey PictureScreenPrivateKey;
+extern DevPrivateKey PictureWindowPrivateKey;
extern RESTYPE PictureType;
extern RESTYPE PictFormatType;
extern RESTYPE GlyphSetType;
-#define GetPictureScreen(s) ((PictureScreenPtr) ((s)->devPrivates[PictureScreenPrivateIndex].ptr))
-#define GetPictureScreenIfSet(s) ((PictureScreenPrivateIndex != -1) ? GetPictureScreen(s) : NULL)
-#define SetPictureScreen(s,p) ((s)->devPrivates[PictureScreenPrivateIndex].ptr = (pointer) (p))
-#define GetPictureWindow(w) ((PicturePtr) ((w)->devPrivates[PictureWindowPrivateIndex].ptr))
-#define SetPictureWindow(w,p) ((w)->devPrivates[PictureWindowPrivateIndex].ptr = (pointer) (p))
+#define GetPictureScreen(s) ((PictureScreenPtr)dixLookupPrivate(&(s)->devPrivates, PictureScreenPrivateKey))
+#define GetPictureScreenIfSet(s) GetPictureScreen(s)
+#define SetPictureScreen(s,p) dixSetPrivate(&(s)->devPrivates, PictureScreenPrivateKey, p)
+#define GetPictureWindow(w) ((PicturePtr)dixLookupPrivate(&(w)->devPrivates, PictureWindowPrivateKey))
+#define SetPictureWindow(w,p) dixSetPrivate(&(w)->devPrivates, PictureWindowPrivateKey, p)
-#define GetGlyphPrivatesForScreen(glyph, s) \
- ((glyph)->devPrivates + (GetPictureScreen (s))->glyphPrivateOffset)
+#define GetGlyphPrivatesForScreen(glyph, s) \
+ ((PrivateRec **)dixLookupPrivateAddr(&(glyph)->devPrivates, s))
#define VERIFY_PICTURE(pPicture, pid, client, mode, err) {\
pPicture = SecurityLookupIDByType(client, pid, PictureType, mode);\
@@ -430,15 +422,6 @@ extern RESTYPE GlyphSetType;
} \
} \
-void
-ResetPicturePrivateIndex (void);
-
-int
-AllocatePicturePrivateIndex (void);
-
-Bool
-AllocatePicturePrivate (ScreenPtr pScreen, int index2, unsigned int amount);
-
Bool
PictureDestroyWindow (WindowPtr pWindow);
@@ -501,9 +484,6 @@ PictureFinishInit (void);
void
SetPictureToDefaults (PicturePtr pPicture);
-PicturePtr
-AllocatePicture (ScreenPtr pScreen);
-
#if 0
Bool
miPictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats);