summaryrefslogtreecommitdiff
path: root/src/glamor_priv.h
diff options
context:
space:
mode:
authorJunyan He <junyan.he@linux.intel.com>2012-03-05 08:24:20 +0800
committerZhigang Gong <zhigang.gong@linux.intel.com>2012-03-06 19:05:58 +0800
commita3bece2867c2d093d706ae789952fed995a780f2 (patch)
tree41985906210384b78d88b1aae594abee3e71bf0c /src/glamor_priv.h
parentf6620ef1af968882159bcc04230b02ae4e8ff877 (diff)
Fixup For list.h change in xorg
Because the file list.h in xorg/include has changed the functions and struct names, adding xorg_ prefix before the original name. So Modify glamor_screen_private struct and the code which use list's functions in glamor_fbo.c. We hack at glamor_priv.h avoid the compile error when using old version xserver header file. Signed-off-by: Junyan He <junyan.he@linux.intel.com>
Diffstat (limited to 'src/glamor_priv.h')
-rwxr-xr-x[-rw-r--r--]src/glamor_priv.h20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/glamor_priv.h b/src/glamor_priv.h
index b9670a3..1404703 100644..100755
--- a/src/glamor_priv.h
+++ b/src/glamor_priv.h
@@ -56,6 +56,20 @@
#include "glamor_debug.h"
#include <list.h>
+/* The list.h rename all the function to add xorg_ prefix.
+ We add hack here to avoid the compile error when using
+ old version xserver header file.
+ These will be removed in future. */
+#ifndef xorg_list_entry
+#define xorg_list list
+#define xorg_list_for_each_entry list_for_each_entry
+#define xorg_list_for_each_entry_safe list_for_each_entry_safe
+#define xorg_list_del list_del
+#define xorg_list_add list_add
+#define xorg_list_append list_append
+#define xorg_list_init list_init
+#endif
+
typedef struct glamor_composite_shader {
GLuint prog;
@@ -177,8 +191,8 @@ typedef struct glamor_screen_private {
int has_fbo_blit;
int max_fbo_size;
- struct list fbo_cache[CACHE_FORMAT_COUNT][CACHE_BUCKET_WCOUNT][CACHE_BUCKET_HCOUNT];
- struct list tex_cache[CACHE_FORMAT_COUNT][CACHE_BUCKET_WCOUNT][CACHE_BUCKET_HCOUNT];
+ struct xorg_list fbo_cache[CACHE_FORMAT_COUNT][CACHE_BUCKET_WCOUNT][CACHE_BUCKET_HCOUNT];
+ struct xorg_list tex_cache[CACHE_FORMAT_COUNT][CACHE_BUCKET_WCOUNT][CACHE_BUCKET_HCOUNT];
/* glamor_solid */
GLint solid_prog;
@@ -262,7 +276,7 @@ typedef union _glamor_pending_op {
* @glamor_priv: point to glamor private data.
*/
typedef struct glamor_pixmap_fbo {
- struct list list;
+ struct xorg_list list;
unsigned int expire;
unsigned char pbo_valid;
GLuint tex;