[Libreoffice-commits] .: Branch 'feature/android' - vcl/android
Michael Meeks
michael at kemper.freedesktop.org
Mon Jan 30 05:53:12 PST 2012
vcl/android/androidinst.cxx | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
New commits:
commit 4f989ddb0dc644c46dee97f4656a03fd24813d00
Author: Michael Meeks <michael.meeks at suse.com>
Date: Mon Jan 30 13:52:50 2012 +0000
android: ask for RGBA visual, and flip images the right way up.
diff --git a/vcl/android/androidinst.cxx b/vcl/android/androidinst.cxx
index a12d7ac..31b1560 100644
--- a/vcl/android/androidinst.cxx
+++ b/vcl/android/androidinst.cxx
@@ -102,7 +102,7 @@ static void BlitFrameRegionToWindow(ANativeWindow_Buffer *pOutBuffer,
for (unsigned int y = 0; y < (unsigned int)(aSrcRect.bottom - aSrcRect.top); y++)
{
- unsigned char *sp = ( pSrc + nStride * (y + aSrcRect.top) +
+ unsigned char *sp = ( pSrc + nStride * (aSrcRect.bottom - aSrcRect.top - y - 1) +
aSrcRect.left * 3 /* src pixel size */ );
switch (pOutBuffer->format) {
@@ -238,10 +238,13 @@ void AndroidSalInstance::onAppCmd (struct android_app* app, int32_t cmd)
ARect aRect = { 0, 0, 0, 0 };
aRect.right = ANativeWindow_getWidth(pWindow);
aRect.bottom = ANativeWindow_getHeight(pWindow);
- fprintf (stderr, "we have an app window ! %p %dx%x (%d)\n",
+ int nRet = ANativeWindow_setBuffersGeometry(
+ pWindow, ANativeWindow_getWidth(pWindow),
+ ANativeWindow_getHeight(pWindow),
+ WINDOW_FORMAT_RGBA_8888);
+ fprintf (stderr, "we have an app window ! %p %dx%x (%d) set %d\n",
pWindow, aRect.right, aRect.bottom,
- ANativeWindow_getFormat(pWindow));
-
+ ANativeWindow_getFormat(pWindow), nRet);
break;
}
case APP_CMD_WINDOW_RESIZED:
More information about the Libreoffice-commits
mailing list