>>>>> "Andreas" == Andreas Tobler <[EMAIL PROTECTED]> writes:
Andreas> 2005-07-24 Andreas Tobler <[EMAIL PROTECTED]> Andreas> * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkImage.c Andreas> (Java_gnu_java_awt_peer_gtk_GtkImage_setPixels): Adjust BE image Andreas> handling. Andreas> +#ifdef WORDS_BIGENDIAN Andreas> + for(j = 0 ; j < width * height; j++) Andreas> + src[j] = SWAPU32((unsigned)src[j]); Andreas> +#endif I'm not so sure that this patch is correct. It modifies 'src' in place. It seems to me that instead we would want to only byte swap the data that we send to gtk. (Not that I know much about this area. I just didn't want this message to go unreplied-to...) Also, I think it would be more efficient to do the swapping at the same time we are doing the copying, instead of swapping first and then copying. That is, put this code into the loop (and only use memcpy as an optimization for LE machines). BTW I think a similar performance tweak should be applied in gnu_java_awt_peer_gtk_GdkPixbufDecoder.c:area_updated_cb() Tom _______________________________________________ Classpath-patches mailing list [email protected] http://lists.gnu.org/mailman/listinfo/classpath-patches
