vcl/android/androidinst.cxx | 26 ++++---------------------- vcl/inc/android/androidinst.hxx | 5 +---- 2 files changed, 5 insertions(+), 26 deletions(-)
New commits: commit a7b932ddfe24a5ea2f49a64000fc1b88c01c7fdb Author: Tor Lillqvist <t...@iki.fi> Date: Sun Mar 17 17:30:33 2013 +0200 AndroidSalInstance::RedrawWindows() is called from only one place No need to take a parameter for which NULL is always passed, and related simplifications. Change-Id: I89bab2904fdae3520987d0f67e55b2649bf225d3 diff --git a/vcl/android/androidinst.cxx b/vcl/android/androidinst.cxx index 89a6cbd..f803b1d 100644 --- a/vcl/android/androidinst.cxx +++ b/vcl/android/androidinst.cxx @@ -117,24 +117,9 @@ void AndroidSalInstance::BlitFrameToWindow(ANativeWindow_Buffer *pOutBuffer, BlitFrameRegionToWindow(pOutBuffer, aDev, aWhole, 0, 0); } -void AndroidSalInstance::RedrawWindows(ANativeWindow *pWindow, ANativeWindow_Buffer *pBuffer) +void AndroidSalInstance::RedrawWindows(ANativeWindow_Buffer *pBuffer) { - ANativeWindow_Buffer aOutBuffer; - memset ((void *)&aOutBuffer, 0, sizeof (aOutBuffer)); - - if (pBuffer != NULL) - aOutBuffer = *pBuffer; - else - { - if (!pWindow) - return; - - // ARect aRect; - LOGI("pre lock #3"); - ANativeWindow_lock(pWindow, &aOutBuffer, NULL); - } - - if (aOutBuffer.bits != NULL) + if (pBuffer->bits != NULL) { int i = 0; std::list< SalFrame* >::const_iterator it; @@ -144,15 +129,12 @@ void AndroidSalInstance::RedrawWindows(ANativeWindow *pWindow, ANativeWindow_Buf if (pFrame->IsVisible()) { - BlitFrameToWindow (&aOutBuffer, pFrame->getDevice()); + BlitFrameToWindow (pBuffer, pFrame->getDevice()); } } } else LOGI("no buffer for locked window"); - - if (pBuffer && pWindow) - ANativeWindow_unlockAndPost(pWindow); } void AndroidSalInstance::damaged(AndroidSalFrame */* frame */) @@ -471,7 +453,7 @@ typedef struct ANativeWindow_Buffer { dummyOut.stride = info.stride / 4; // sigh ! dummyOut.format = info.format; dummyOut.bits = pixels; - AndroidSalInstance::getInstance()->RedrawWindows (NULL, &dummyOut); + AndroidSalInstance::getInstance()->RedrawWindows (&dummyOut); AndroidBitmap_unlockPixels(env, bitmap); } diff --git a/vcl/inc/android/androidinst.hxx b/vcl/inc/android/androidinst.hxx index 554f29f..45f6de2 100644 --- a/vcl/inc/android/androidinst.hxx +++ b/vcl/inc/android/androidinst.hxx @@ -62,7 +62,7 @@ public: // mainloop pieces virtual bool AnyInput( sal_uInt16 nType ); - void RedrawWindows(ANativeWindow *pWindow, ANativeWindow_Buffer *pBuffer = NULL); + void RedrawWindows(ANativeWindow_Buffer *pBuffer); SalFrame *getFocusFrame() const; void damaged(AndroidSalFrame *frame); commit 4994ccd7d4ec7912f63882138b169221bb273249 Author: Tor Lillqvist <t...@iki.fi> Date: Sun Mar 17 17:18:22 2013 +0200 onAppCmd() and onInputEvent() don't exist any more They were used in the NativeActivity-based coding. Change-Id: Id393026783c989f05d90ad79cc4e8f5e8cd0174e diff --git a/vcl/inc/android/androidinst.hxx b/vcl/inc/android/androidinst.hxx index f2f0a2e..554f29f 100644 --- a/vcl/inc/android/androidinst.hxx +++ b/vcl/inc/android/androidinst.hxx @@ -62,9 +62,6 @@ public: // mainloop pieces virtual bool AnyInput( sal_uInt16 nType ); - // incoming android event handlers: - void onAppCmd (struct android_app* app, int32_t cmd); - int32_t onInputEvent (struct android_app* app, AInputEvent* event); void RedrawWindows(ANativeWindow *pWindow, ANativeWindow_Buffer *pBuffer = NULL); SalFrame *getFocusFrame() const; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits