[cairo-commit] glitz/src/glx glitz_glx_context.c, 1.8,
1.9 glitz_glx_drawable.c, 1.6, 1.7 glitz_glx_extension.c, 1.5,
1.6 glitz_glx_info.c, 1.5, 1.6 glitz_glxext.h, 1.3,
1.4 glitz_glxint.h, 1.5, 1.6
David Reveman
commit at pdx.freedesktop.org
Mon Mar 13 05:42:48 PST 2006
- Previous message: [cairo-commit] glitz/src/egl glitz_egl_context.c, 1.4,
1.5 glitz_egl_surface.c, 1.4, 1.5 glitz_eglint.h, 1.3, 1.4
- Next message: [cairo-commit] glitz/src/wgl glitz_wgl_context.c, 1.2,
1.3 glitz_wgl_drawable.c, 1.2, 1.3 glitz_wglint.h, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Committed by: davidr
Update of /cvs/cairo/glitz/src/glx
In directory kemper:/tmp/cvs-serv15574/src/glx
Modified Files:
glitz_glx_context.c glitz_glx_drawable.c glitz_glx_extension.c
glitz_glx_info.c glitz_glxext.h glitz_glxint.h
Log Message:
Add CopySubBufferMESA support
Index: glitz_glx_context.c
===================================================================
RCS file: /cvs/cairo/glitz/src/glx/glitz_glx_context.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- glitz_glx_context.c 21 Dec 2005 16:19:51 -0000 1.8
+++ glitz_glx_context.c 13 Mar 2006 13:42:46 -0000 1.9
@@ -279,6 +279,7 @@
context->backend.attach_notify = _glitz_glx_notify_dummy;
context->backend.detach_notify = _glitz_glx_notify_dummy;
context->backend.swap_buffers = glitz_glx_swap_buffers;
+ context->backend.copy_sub_buffer = glitz_glx_copy_sub_buffer;
context->backend.create_context = _glitz_glx_create_context;
context->backend.destroy_context = _glitz_glx_context_destroy;
@@ -364,6 +365,9 @@
}
}
+ if (screen_info->glx_feature_mask & GLITZ_GLX_FEATURE_COPY_SUB_BUFFER_MASK)
+ context->backend.feature_mask |= GLITZ_FEATURE_COPY_SUB_BUFFER_MASK;
+
context->initialized = 1;
}
Index: glitz_glx_drawable.c
===================================================================
RCS file: /cvs/cairo/glitz/src/glx/glitz_glx_drawable.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- glitz_glx_drawable.c 6 Feb 2006 22:26:05 -0000 1.6
+++ glitz_glx_drawable.c 13 Mar 2006 13:42:46 -0000 1.7
@@ -241,3 +241,25 @@
return 1;
}
+
+glitz_bool_t
+glitz_glx_copy_sub_buffer (void *abstract_drawable,
+ int x,
+ int y,
+ int width,
+ int height)
+{
+ glitz_glx_drawable_t *drawable = (glitz_glx_drawable_t *)
+ abstract_drawable;
+ glitz_glx_screen_info_t *screen_info = drawable->screen_info;
+
+ if (screen_info->glx_feature_mask & GLITZ_GLX_FEATURE_COPY_SUB_BUFFER_MASK)
+ {
+ screen_info->glx.copy_sub_buffer (screen_info->display_info->display,
+ drawable->drawable,
+ x, y, width, height);
+ return 1;
+ }
+
+ return 0;
+}
Index: glitz_glx_extension.c
===================================================================
RCS file: /cvs/cairo/glitz/src/glx/glitz_glx_extension.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- glitz_glx_extension.c 14 Feb 2006 14:23:47 -0000 1.5
+++ glitz_glx_extension.c 13 Mar 2006 13:42:46 -0000 1.6
@@ -39,17 +39,28 @@
{ 0.0, NULL, 0 }
};
+/* XXX: only checking for client side support right now */
+static glitz_extension_map glx_client_extensions[] = {
+ { 0.0, "GLX_MESA_copy_sub_buffer", GLITZ_GLX_FEATURE_COPY_SUB_BUFFER_MASK },
+ { 0.0, NULL, 0 }
+};
+
void
glitz_glx_query_extensions (glitz_glx_screen_info_t *screen_info,
glitz_gl_float_t glx_version)
{
const char *glx_extensions_string;
+ const char *glx_client_extensions_string;
const char *vendor;
glx_extensions_string =
glXQueryExtensionsString (screen_info->display_info->display,
screen_info->screen);
+ glx_client_extensions_string =
+ glXGetClientString (screen_info->display_info->display,
+ GLX_EXTENSIONS);
+
vendor = glXGetClientString (screen_info->display_info->display,
GLX_VENDOR);
@@ -68,6 +79,11 @@
glx_extensions_string,
glx_extensions);
+ screen_info->glx_feature_mask |=
+ glitz_extensions_query (glx_version,
+ glx_client_extensions_string,
+ glx_client_extensions);
+
if (vendor)
{
if (screen_info->glx_feature_mask & GLITZ_GLX_FEATURE_MULTISAMPLE_MASK)
Index: glitz_glx_info.c
===================================================================
RCS file: /cvs/cairo/glitz/src/glx/glitz_glx_info.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- glitz_glx_info.c 14 Sep 2005 15:57:16 -0000 1.5
+++ glitz_glx_info.c 13 Mar 2006 13:42:46 -0000 1.6
@@ -256,6 +256,17 @@
~GLITZ_GLX_FEATURE_MAKE_CURRENT_READ_MASK;
}
+ if (screen_info->glx_feature_mask & GLITZ_GLX_FEATURE_COPY_SUB_BUFFER_MASK)
+ {
+ screen_info->glx.copy_sub_buffer = (glitz_glx_copy_sub_buffer_t)
+ glitz_glx_get_proc_address ("glXCopySubBufferMESA",
+ (void *) screen_info);
+
+ if (!screen_info->glx.copy_sub_buffer)
+ screen_info->glx_feature_mask &=
+ ~GLITZ_GLX_FEATURE_COPY_SUB_BUFFER_MASK;
+ }
+
if (screen_info->glx_feature_mask &
GLITZ_GLX_FEATURE_GET_PROC_ADDRESS_MASK) {
if (screen_info->glx_version >= 1.4f) {
Index: glitz_glxext.h
===================================================================
RCS file: /cvs/cairo/glitz/src/glx/glitz_glxext.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- glitz_glxext.h 14 Sep 2005 15:57:16 -0000 1.3
+++ glitz_glxext.h 13 Mar 2006 13:42:46 -0000 1.4
@@ -120,9 +120,7 @@
#define GLX_SAMPLES_ARB 0x186a1
#endif
-typedef Bool *(* glitz_glx_bind_tex_image_t)
- (Display *display, GLXPbuffer pbuffer, int buffer);
-typedef Bool (* glitz_glx_release_tex_image_t)
- (Display *display, GLXPbuffer pbuffer, int buffer);
+typedef void *(* glitz_glx_copy_sub_buffer_t)
+ (Display *display, GLXDrawable draw, int x, int y, int w, int h);
#endif /* GLITZ_GLXEXT_H_INCLUDED */
Index: glitz_glxint.h
===================================================================
RCS file: /cvs/cairo/glitz/src/glx/glitz_glxint.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- glitz_glxint.h 14 Sep 2005 15:57:16 -0000 1.5
+++ glitz_glxint.h 13 Mar 2006 13:42:46 -0000 1.6
@@ -43,6 +43,7 @@
#define GLITZ_GLX_FEATURE_GET_PROC_ADDRESS_MASK (1L << 4)
#define GLITZ_GLX_FEATURE_MULTISAMPLE_MASK (1L << 5)
#define GLITZ_GLX_FEATURE_PBUFFER_MULTISAMPLE_MASK (1L << 6)
+#define GLITZ_GLX_FEATURE_COPY_SUB_BUFFER_MASK (1L << 7)
typedef struct _glitz_glx_drawable glitz_glx_drawable_t;
typedef struct _glitz_glx_screen_info_t glitz_glx_screen_info_t;
@@ -58,6 +59,7 @@
glitz_glx_query_drawable_t query_drawable;
glitz_glx_make_context_current_t make_context_current;
glitz_glx_create_new_context_t create_new_context;
+ glitz_glx_copy_sub_buffer_t copy_sub_buffer;
} glitz_glx_static_proc_address_list_t;
typedef struct _glitz_glx_thread_info_t {
@@ -183,6 +185,13 @@
extern glitz_bool_t __internal_linkage
glitz_glx_swap_buffers (void *abstract_drawable);
+extern glitz_bool_t __internal_linkage
+glitz_glx_copy_sub_buffer (void *abstract_drawable,
+ int x,
+ int y,
+ int width,
+ int height);
+
/* Avoid unnecessary PLT entries. */
slim_hidden_proto(glitz_glx_init)
- Previous message: [cairo-commit] glitz/src/egl glitz_egl_context.c, 1.4,
1.5 glitz_egl_surface.c, 1.4, 1.5 glitz_eglint.h, 1.3, 1.4
- Next message: [cairo-commit] glitz/src/wgl glitz_wgl_context.c, 1.2,
1.3 glitz_wgl_drawable.c, 1.2, 1.3 glitz_wglint.h, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the cairo-commit
mailing list