summaryrefslogtreecommitdiff
path: root/sal/android/lo-bootstrap.c
diff options
context:
space:
mode:
authorTor Lillqvist <tlillqvist@suse.com>2012-06-05 17:05:56 +0300
committerTor Lillqvist <tlillqvist@suse.com>2012-06-05 17:17:41 +0300
commit8ae077379edcdbf7bf106121593361d2486aacb7 (patch)
tree207e4b9d516a56e2ebbf500cd80baca2d275894c /sal/android/lo-bootstrap.c
parent92f23297c93dc105e2ffd9ff09c0dafff1ee0fd3 (diff)
Use 32bpp bitmaps on Android (and iOS)
Modify DocumentLoader correspondingly. Take Android bug 32588 into account. Ideal would be to extend the XDevice stuff, or something, so that one could hand it a pre-allocated RGBA buffer into which the drawing/rendering would go. Then one could get rid of the silly convert-to-BMP phase, which prefixes the bitmap data with BMP and DIB headers (and thus, I guess, has to copy and allocate another copy). Will see. Change-Id: I4597cd933db8faa8105dc8f19638d712d5d2238a
Diffstat (limited to 'sal/android/lo-bootstrap.c')
-rw-r--r--sal/android/lo-bootstrap.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/sal/android/lo-bootstrap.c b/sal/android/lo-bootstrap.c
index fed7a4d5e271..b6e29baf13e3 100644
--- a/sal/android/lo-bootstrap.c
+++ b/sal/android/lo-bootstrap.c
@@ -1906,6 +1906,29 @@ Java_org_libreoffice_android_Bootstrap_twiddle_1BGR_1to_1RGBA(JNIEnv* env,
}
__attribute__ ((visibility("default")))
+void
+Java_org_libreoffice_android_Bootstrap_force_1full_1alpha(JNIEnv* env,
+ jobject clazz,
+ jbyteArray array,
+ jint offset,
+ jint size)
+{
+ void *a = (*env)->GetPrimitiveArrayCritical(env, array, NULL);
+ jbyte *p = ((jbyte *) a) + offset;
+
+ int i;
+
+ (void) clazz;
+
+ for (i = 0; i < size; i += 4) {
+ p[3] = 0xFF;
+ p += 4;
+ }
+
+ (*env)->ReleasePrimitiveArrayCritical(env, array, a, 0);
+}
+
+__attribute__ ((visibility("default")))
JavaVM *
lo_get_javavm(void)
{