summaryrefslogtreecommitdiff
path: root/android
diff options
context:
space:
mode:
authorTor Lillqvist <tlillqvist@suse.com>2012-05-31 16:11:44 +0300
committerTor Lillqvist <tlillqvist@suse.com>2012-05-31 16:20:53 +0300
commit9776138e973e22cfd4ae418782ab87d01335ad22 (patch)
tree784cebafe3362d5c5a12314a4712f7fcf29ec2da /android
parentdea03edc8a74c565b1332a192fced582f0a497ea (diff)
Add a BGR to RGBA twiddling JNI function
Change-Id: Iafa2c1805eea2f521479dc97d5668d82b1c91bef
Diffstat (limited to 'android')
-rw-r--r--android/Bootstrap/src/org/libreoffice/android/Bootstrap.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java b/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java
index 25fded86dfc4..47366a22f46d 100644
--- a/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java
+++ b/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java
@@ -39,6 +39,7 @@ import fi.iki.tml.CommandLine;
import java.io.File;
import java.io.InputStream;
+import java.nio.ByteBuffer;
import java.util.Arrays;
import java.util.Scanner;
@@ -108,6 +109,13 @@ public class Bootstrap extends NativeActivity
// the Android logging mechanism, or stops the redirection.
public static native boolean redirect_stdio(boolean state);
+ // The DIB returned by css.awt.XBitmap.getDIB is in BGR_888 form, at least
+ // for Writer documents. We need it in Android's Bitmap.Config.ARGB_888
+ // format, which actually is RGBA_888, whee... At least in Android 4.0.3,
+ // at least on my device. No idea if it is always like that or not, the
+ // documentation sucks.
+ public static native void twiddle_BGR_to_RGBA(byte[] source, int offset, int width, int height, ByteBuffer destination);
+
// This setup() method is called 1) in apps that use *this* class as their activity from onCreate(),
// and 2) should be called from other kinds of LO code using apps.
public static void setup(Activity activity)