diff options
5 files changed, 28 insertions, 5 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo.c b/bundles/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo.c index 375feecc23..bd00c9b873 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo.c +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo.c @@ -15,7 +15,7 @@ * * IBM * - Binding to permit interfacing between Cairo and SWT - * - Copyright (C) 2005, 2011 IBM Corp. All Rights Reserved. + * - Copyright (C) 2005, 2012 IBM Corp. All Rights Reserved. * * ***** END LICENSE BLOCK ***** */ @@ -1560,6 +1560,16 @@ JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1surface_1finish) } #endif +#ifndef NO__1cairo_1surface_1flush +JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1surface_1flush) + (JNIEnv *env, jclass that, jintLong arg0) +{ + Cairo_NATIVE_ENTER(env, that, _1cairo_1surface_1flush_FUNC); + cairo_surface_flush((cairo_surface_t *)arg0); + Cairo_NATIVE_EXIT(env, that, _1cairo_1surface_1flush_FUNC); +} +#endif + #ifndef NO__1cairo_1surface_1get_1content JNIEXPORT jint JNICALL Cairo_NATIVE(_1cairo_1surface_1get_1content) (JNIEnv *env, jclass that, jintLong arg0) diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo_stats.c b/bundles/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo_stats.c index efa425155e..130d6f2687 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo_stats.c +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo_stats.c @@ -15,7 +15,7 @@ * * IBM * - Binding to permit interfacing between Cairo and SWT - * - Copyright (C) 2005, 2011 IBM Corp. All Rights Reserved. + * - Copyright (C) 2005, 2012 IBM Corp. All Rights Reserved. * * ***** END LICENSE BLOCK ***** */ @@ -24,8 +24,8 @@ #ifdef NATIVE_STATS -int Cairo_nativeFunctionCount = 153; -int Cairo_nativeFunctionCallCount[153]; +int Cairo_nativeFunctionCount = 154; +int Cairo_nativeFunctionCallCount[154]; char * Cairo_nativeFunctionNames[] = { "CAIRO_1VERSION_1ENCODE", "_1cairo_1append_1path", @@ -153,6 +153,7 @@ char * Cairo_nativeFunctionNames[] = { "_1cairo_1surface_1create_1similar", "_1cairo_1surface_1destroy", "_1cairo_1surface_1finish", + "_1cairo_1surface_1flush", "_1cairo_1surface_1get_1content", "_1cairo_1surface_1get_1type", "_1cairo_1surface_1get_1user_1data", diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo_stats.h b/bundles/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo_stats.h index 27b582cb6a..49e3379410 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo_stats.h +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo_stats.h @@ -15,7 +15,7 @@ * * IBM * - Binding to permit interfacing between Cairo and SWT - * - Copyright (C) 2005, 2011 IBM Corp. All Rights Reserved. + * - Copyright (C) 2005, 2012 IBM Corp. All Rights Reserved. * * ***** END LICENSE BLOCK ***** */ @@ -161,6 +161,7 @@ typedef enum { _1cairo_1surface_1create_1similar_FUNC, _1cairo_1surface_1destroy_FUNC, _1cairo_1surface_1finish_FUNC, + _1cairo_1surface_1flush_FUNC, _1cairo_1surface_1get_1content_FUNC, _1cairo_1surface_1get_1type_FUNC, _1cairo_1surface_1get_1user_1data_FUNC, diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cairo/org/eclipse/swt/internal/cairo/Cairo.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cairo/org/eclipse/swt/internal/cairo/Cairo.java index 1ed26761c6..3905a28b7a 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/cairo/org/eclipse/swt/internal/cairo/Cairo.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cairo/org/eclipse/swt/internal/cairo/Cairo.java @@ -1421,6 +1421,16 @@ public static final void cairo_surface_destroy(int /*long*/ surface) { } } /** @param surface cast=(cairo_surface_t *) */ +public static final native void _cairo_surface_flush(int /*long*/ surface); +public static final void cairo_surface_flush(int /*long*/ surface) { + lock.lock(); + try { + _cairo_surface_flush(surface); + } finally { + lock.unlock(); + } +} +/** @param surface cast=(cairo_surface_t *) */ public static final native void _cairo_surface_finish(int /*long*/ surface); public static final void cairo_surface_finish(int /*long*/ surface) { lock.lock(); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java index 8f4c8f4059..af5967651c 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java @@ -1440,6 +1440,7 @@ void init(ImageData image) { } } OS.memmove(data, buffer, stride * height); + Cairo.cairo_surface_flush(surface); //TODO convert to XLIB surface if opaque for better performance return; } |