summaryrefslogtreecommitdiff
path: root/vcl/android
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2015-05-21 15:24:59 +0100
committerTor Lillqvist <tml@collabora.com>2015-05-21 16:43:58 +0100
commitff2c4ee8a5416c90b1344cb95b69483156d4d210 (patch)
tree87216cb30d7a3dc2fe791bf823bfcee34fa25e7f /vcl/android
parent99938e7bc8a305dcc9733adbe635e25a38afed31 (diff)
Bin unused code
Diffstat (limited to 'vcl/android')
-rw-r--r--vcl/android/androidinst.cxx107
1 files changed, 0 insertions, 107 deletions
diff --git a/vcl/android/androidinst.cxx b/vcl/android/androidinst.cxx
index 03ddd0b2f7d6..82c4a3375e24 100644
--- a/vcl/android/androidinst.cxx
+++ b/vcl/android/androidinst.cxx
@@ -38,90 +38,6 @@ public:
virtual bool ErrorTrapPop( bool ) { return false; }
};
-static void BlitFrameRegionToWindow(ANativeWindow_Buffer *pOutBuffer,
- const basebmp::BitmapDeviceSharedPtr& aDev,
- const ARect &rSrcRect,
- int nDestX, int nDestY)
-{
- basebmp::RawMemorySharedArray aSrcData = aDev->getBuffer();
- basegfx::B2IVector aDevSize = aDev->getSize();
- sal_Int32 nStride = aDev->getScanlineStride();
- unsigned char *pSrc = aSrcData.get();
-
- // FIXME: do some cropping goodness on aSrcRect to ensure no overflows etc.
- ARect aSrcRect = rSrcRect;
-
- for (unsigned int y = 0; y < (unsigned int)(aSrcRect.bottom - aSrcRect.top); y++)
- {
- unsigned char *sp = ( pSrc + nStride * (aSrcRect.top + y) +
- aSrcRect.left * 4 /* src pixel size */ );
-
- switch (pOutBuffer->format) {
- case WINDOW_FORMAT_RGBA_8888:
- case WINDOW_FORMAT_RGBX_8888:
- {
- unsigned char *dp = ( (unsigned char *)pOutBuffer->bits +
- pOutBuffer->stride * 4 * (y + nDestY) +
- nDestX * 4 /* dest pixel size */ );
- for (unsigned int x = 0; x < (unsigned int)(aSrcRect.right - aSrcRect.left); x++)
- {
- dp[x*4 + 0] = sp[x*4 + 0]; // R
- dp[x*4 + 1] = sp[x*4 + 1]; // G
- dp[x*4 + 2] = sp[x*4 + 2]; // B
- dp[x*4 + 3] = 255; // A
- }
- break;
- }
- case WINDOW_FORMAT_RGB_565:
- {
- unsigned char *dp = ( (unsigned char *)pOutBuffer->bits +
- pOutBuffer->stride * 2 * (y + nDestY) +
- nDestX * 2 /* dest pixel size */ );
- for (unsigned int x = 0; x < (unsigned int)(aSrcRect.right - aSrcRect.left); x++)
- {
- unsigned char b = sp[x*3 + 0]; // B
- unsigned char g = sp[x*3 + 1]; // G
- unsigned char r = sp[x*3 + 2]; // R
- dp[x*2 + 0] = (r & 0xf8) | (g >> 5);
- dp[x*2 + 1] = ((g & 0x1c) << 5) | ((b & 0xf8) >> 3);
- }
- break;
- }
- default:
- LOGI("unknown pixel format %d !", pOutBuffer->format);
- break;
- }
- }
-}
-
-void AndroidSalInstance::BlitFrameToWindow(ANativeWindow_Buffer *pOutBuffer,
- const basebmp::BitmapDeviceSharedPtr& aDev)
-{
- basegfx::B2IVector aDevSize = aDev->getSize();
- ARect aWhole = { 0, 0, aDevSize.getX(), aDevSize.getY() };
- BlitFrameRegionToWindow(pOutBuffer, aDev, aWhole, 0, 0);
-}
-
-void AndroidSalInstance::RedrawWindows(ANativeWindow_Buffer *pBuffer)
-{
- if (pBuffer->bits != NULL)
- {
- int i = 0;
- std::list< SalFrame* >::const_iterator it;
- for ( it = getFrames().begin(); it != getFrames().end(); i++, ++it )
- {
- SvpSalFrame *pFrame = static_cast<SvpSalFrame *>(*it);
-
- if (pFrame->IsVisible())
- {
- BlitFrameToWindow (pBuffer, pFrame->getDevice());
- }
- }
- }
- else
- LOGI("no buffer for locked window");
-}
-
void AndroidSalInstance::damaged(AndroidSalFrame */* frame */)
{
static bool beenHere = false;
@@ -148,29 +64,6 @@ void AndroidSalInstance::GetWorkArea( Rectangle& rRect )
Size( viewWidth, viewHeight ) );
}
-/*
- * Try too hard to get a frame, in the absence of anything better to do
- */
-SalFrame *AndroidSalInstance::getFocusFrame() const
-{
- SalFrame *pFocus = SvpSalFrame::GetFocusFrame();
- if (!pFocus) {
- LOGI("no focus frame, re-focusing first visible frame");
- const std::list< SalFrame* >& rFrames( getFrames() );
- for( std::list< SalFrame* >::const_iterator it = rFrames.begin(); it != rFrames.end(); ++it )
- {
- SvpSalFrame *pFrame = const_cast<SvpSalFrame*>(static_cast<const SvpSalFrame*>(*it));
- if( pFrame->IsVisible() )
- {
- pFrame->GetFocus();
- pFocus = pFrame;
- break;
- }
- }
- }
- return pFocus;
-}
-
AndroidSalInstance *AndroidSalInstance::getInstance()
{
if (!ImplGetSVData())