summaryrefslogtreecommitdiff
path: root/vcl/android/androidinst.cxx
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2013-03-17 17:30:33 +0200
committerTor Lillqvist <tml@iki.fi>2013-03-17 17:34:15 +0200
commita7b932ddfe24a5ea2f49a64000fc1b88c01c7fdb (patch)
tree288e6ffa9ab118cb31ccdb28b999481bfcab7d46 /vcl/android/androidinst.cxx
parent4994ccd7d4ec7912f63882138b169221bb273249 (diff)
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
Diffstat (limited to 'vcl/android/androidinst.cxx')
-rw-r--r--vcl/android/androidinst.cxx26
1 files changed, 4 insertions, 22 deletions
diff --git a/vcl/android/androidinst.cxx b/vcl/android/androidinst.cxx
index 89a6cbdf9b08..f803b1d3f882 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);
}