[cairo-commit] CairoJava/jni CairoGlitzSurface.cpp,1.4,1.5
Soorya Kuloor
commit at pdx.freedesktop.org
Thu May 20 12:36:40 PDT 2004
- Previous message: [cairo-commit] gtkcairo/gtkcairo gdkcairo.c, NONE, 1.1 gdkcairo.h,
NONE, 1.1 Makefile.am, 1.1, 1.2 gtkcairo.c, 1.11,
1.12 gtkcairo.h, 1.7, 1.8
- Next message: [cairo-commit] CairoJava/test/org/cairographics/cairo/test
TestCairoImage.java, 1.4, 1.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Committed by: skuloor
Update of /cvs/cairo/CairoJava/jni
In directory pdx:/tmp/cvs-serv30239/jni
Modified Files:
CairoGlitzSurface.cpp
Log Message:
1. Port to latest cairo CVS version.
2. Add support for glitz_surface_flush etc functions.
Index: CairoGlitzSurface.cpp
===================================================================
RCS file: /cvs/cairo/CairoJava/jni/CairoGlitzSurface.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** a/CairoGlitzSurface.cpp 13 May 2004 16:45:38 -0000 1.4
--- b/CairoGlitzSurface.cpp 20 May 2004 19:36:38 -0000 1.5
***************
*** 37,40 ****
--- 37,52 ----
/*
+ * Map an integer value onto a glitz_buffer_t enum value.
+ * If the mapping doesn't exist return NULL;
+ */
+ glitz_buffer_t to_glitz_buffer_t(int bufferval) {
+ switch ( bufferval ) {
+ case 0: return GLITZ_BUFFER_FRONT;
+ case 1: return GLITZ_BUFFER_BACK;
+ default: return (glitz_buffer_t)NULL;
+ }
+ }
+
+ /*
* Class: org_cairographics_cairo_CairoGlitzSurface
* Method: cairo_set_target_gl
***************
*** 105,116 ****
/*
* Class: org_cairographics_cairo_CairoGlitzSurface
! * Method: glitz_glx_surface_flush
! * Signature: (JIIII)V
*/
! JNIEXPORT void JNICALL Java_org_cairographics_cairo_CairoGlitzSurface_glitz_1glx_1surface_1flush
! (JNIEnv *env, jclass me, jlong glitz_surfacep, jint x, jint y, jint width, jint height)
{
#ifdef CAIRO_HAS_GL_SURFACE
! glitz_surface_flush(TO_PTR(glitz_surface_t, glitz_surfacep), x, y, width, height);
#else
throw_surface_not_supported_exception(env, "glitz");
--- 117,128 ----
/*
* Class: org_cairographics_cairo_CairoGlitzSurface
! * Method: glitz_surface_flush
! * Signature: (J)V
*/
! JNIEXPORT void JNICALL Java_org_cairographics_cairo_CairoGlitzSurface_glitz_1surface_1flush
! (JNIEnv *env, jclass me, jlong glitz_surfacep)
{
#ifdef CAIRO_HAS_GL_SURFACE
! glitz_surface_flush(TO_PTR(glitz_surface_t, glitz_surfacep));
#else
throw_surface_not_supported_exception(env, "glitz");
***************
*** 119,122 ****
--- 131,201 ----
/*
+ * Class: org_cairographics_cairo_CairoGlitzSurface
+ * Method: glitz_surface_swap_buffers
+ * Signature: (J)V
+ */
+ JNIEXPORT void JNICALL Java_org_cairographics_cairo_CairoGlitzSurface_glitz_1swap_1buffers
+ (JNIEnv *env, jclass me, jlong glitz_surfacep)
+ {
+ #ifdef CAIRO_HAS_GL_SURFACE
+ glitz_surface_swap_buffers(TO_PTR(glitz_surface_t, glitz_surfacep));
+ #else
+ throw_surface_not_supported_exception(env, "glitz");
+ #endif
+ }
+
+ /*
+ * Class: org_cairographics_cairo_CairoGlitzSurface
+ * Method: glitz_surface_set_read_buffer
+ * Signature: (JI)V
+ */
+ JNIEXPORT void JNICALL Java_org_cairographics_cairo_CairoGlitzSurface_glitz_1surface_1set_1read_1buffer
+ (JNIEnv *env, jclass me, jlong glitz_surfacep, jint buffer)
+ {
+ #ifdef CAIRO_HAS_GL_SURFACE
+ glitz_surface_set_read_buffer(TO_PTR(glitz_surface_t, glitz_surfacep), to_glitz_buffer_t(buffer));
+ #else
+ throw_surface_not_supported_exception(env, "glitz");
+ #endif
+ }
+
+ /*
+ * Class: org_cairographics_cairo_CairoGlitzSurface
+ * Method: glitz_surface_set_draw_buffer
+ * Signature: (JI)V
+ */
+ JNIEXPORT void JNICALL Java_org_cairographics_cairo_CairoGlitzSurface_glitz_1surface_1set_1draw_1buffer
+ (JNIEnv *env, jclass me, jlong glitz_surfacep, jint buffer)
+ {
+ #ifdef CAIRO_HAS_GL_SURFACE
+ glitz_surface_set_draw_buffer(TO_PTR(glitz_surface_t, glitz_surfacep), to_glitz_buffer_t(buffer));
+ #else
+ throw_surface_not_supported_exception(env, "glitz");
+ #endif
+ }
+
+ /*
+ * Class: org_cairographics_cairo_CairoGlitzSurface
+ * Method: glitz_copy_area
+ * Signature: (JI)V
+ */
+ JNIEXPORT void JNICALL Java_org_cairographics_cairo_CairoGlitzSurface_glitz_1copy_1area
+ (JNIEnv *env, jclass me, jlong glitz_surface_srcp, jlong glitz_surface_destp,
+ jint x_src, jint y_src,
+ jint width, jint height,
+ jint x_dst, jint y_dst) {
+
+ #ifdef CAIRO_HAS_GL_SURFACE
+ glitz_copy_area (TO_PTR(glitz_surface_t, glitz_surface_srcp),
+ TO_PTR(glitz_surface_t, glitz_surface_destp),
+ x_src, y_src,
+ width, height,
+ x_dst, y_dst);
+ #else
+ throw_surface_not_supported_exception(env, "glitz");
+ #endif
+ }
+
+ /*
* Class: org_cairographics_cairo_Cairo
* Method: cairo_init
- Previous message: [cairo-commit] gtkcairo/gtkcairo gdkcairo.c, NONE, 1.1 gdkcairo.h,
NONE, 1.1 Makefile.am, 1.1, 1.2 gtkcairo.c, 1.11,
1.12 gtkcairo.h, 1.7, 1.8
- Next message: [cairo-commit] CairoJava/test/org/cairographics/cairo/test
TestCairoImage.java, 1.4, 1.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the cairo-commit
mailing list