summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2010-05-15 14:52:39 -0700
committerKeith Packard <keithp@keithp.com>2010-06-05 19:11:32 -0700
commit431781a921251d54782f0a4f194bbef1fabd1380 (patch)
tree474de8723f4d328709c5d92c4df68263cb4fec96 /include
parent7ef612de784daaed09ba13f4615c10714614033f (diff)
Remove dixRegisterPrivateOffset; hard-code devPrivates offsets instead
For predefined resource types, the offset of the devPrivates field was already kept in a constant table. The only non-predefined type needing this treatment was dbeDrawableResType, which is just a magic alias for RT_PIXMAP. This patch special-cases looking up RC_DRAWABLE offsets and uses the table directly for everything else. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Jamey Sharp <jamey@minilop.net>
Diffstat (limited to 'include')
-rw-r--r--include/privates.h18
1 files changed, 4 insertions, 14 deletions
diff --git a/include/privates.h b/include/privates.h
index 7850dea6d..72f4d4028 100644
--- a/include/privates.h
+++ b/include/privates.h
@@ -108,26 +108,16 @@ extern _X_EXPORT int
dixResetPrivates(void);
/*
- * These next two functions are necessary because the position of
- * the devPrivates field varies by structure and calling code might
- * only know the resource type, not the structure definition.
- */
-
-/*
* Looks up the offset where the devPrivates field is located.
- * Returns -1 if no offset has been registered for the resource type.
+ * Returns -1 if the specified resource has no dev privates.
+ * The position of the devPrivates field varies by structure
+ * and calling code might only know the resource type, not the
+ * structure definition.
*/
extern _X_EXPORT int
dixLookupPrivateOffset(RESTYPE type);
/*
- * Specifies the offset where the devPrivates field is located.
- * A negative value indicates no devPrivates field is available.
- */
-extern _X_EXPORT int
-dixRegisterPrivateOffset(RESTYPE type, int offset);
-
-/*
* Convenience macro for adding an offset to an object pointer
* when making a call to one of the devPrivates functions
*/