summaryrefslogtreecommitdiffstats
path: root/vcl/headless
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 /vcl/headless
parentWork in progress: Add "touch" module for Android and iOS stuff (diff)
downloadcore-8ae077379edcdbf7bf106121593361d2486aacb7.tar.gz
core-8ae077379edcdbf7bf106121593361d2486aacb7.zip
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 'vcl/headless')
-rw-r--r--vcl/headless/svpbmp.cxx1
-rw-r--r--vcl/headless/svpframe.cxx5
-rw-r--r--vcl/headless/svpvd.cxx6
3 files changed, 11 insertions, 1 deletions
diff --git a/vcl/headless/svpbmp.cxx b/vcl/headless/svpbmp.cxx
index d27b7654c56f..f1d8d49f6c66 100644
--- a/vcl/headless/svpbmp.cxx
+++ b/vcl/headless/svpbmp.cxx
@@ -59,6 +59,7 @@ bool SvpSalBitmap::Create( const Size& rSize,
case 16: nFormat = Format::SIXTEEN_BIT_LSB_TC_MASK; break;
#endif
case 24: nFormat = Format::TWENTYFOUR_BIT_TC_MASK; break;
+ // FIXME: Should this for Android be THIRTYTWO_BIT_TC_MASK_ARGB?
case 32: nFormat = Format::THIRTYTWO_BIT_TC_MASK; break;
}
B2IVector aSize( rSize.Width(), rSize.Height() );
diff --git a/vcl/headless/svpframe.cxx b/vcl/headless/svpframe.cxx
index 63f4a49ac978..208313de99c3 100644
--- a/vcl/headless/svpframe.cxx
+++ b/vcl/headless/svpframe.cxx
@@ -92,8 +92,13 @@ SvpSalFrame::SvpSalFrame( SvpSalInstance* pInstance,
m_aSystemChildData.nSize = sizeof( SystemChildData );
#if defined( UNX ) // FIXME: prolly redundant
m_aSystemChildData.pSalFrame = this;
+#if defined(ANDROID) || defined(IOS)
+ // We want 32-bit RGBA bitmaps
+ m_aSystemChildData.nDepth = 32;
+#else
m_aSystemChildData.nDepth = 24;
#endif
+#endif
if( m_pParent )
m_pParent->m_aChildren.push_back( this );
diff --git a/vcl/headless/svpvd.cxx b/vcl/headless/svpvd.cxx
index 8b90d648d5d5..285eeafc9b15 100644
--- a/vcl/headless/svpvd.cxx
+++ b/vcl/headless/svpvd.cxx
@@ -80,9 +80,13 @@ sal_Bool SvpSalVirtualDevice::SetSize( long nNewDX, long nNewDY )
#else
case 16: nFormat = Format::SIXTEEN_BIT_LSB_TC_MASK; break;
#endif
- case 0:
case 24: nFormat = Format::TWENTYFOUR_BIT_TC_MASK; break;
case 32: nFormat = Format::THIRTYTWO_BIT_TC_MASK; break;
+#if defined(ANDROID) || defined(IOS)
+ case 0: nFormat = Format::THIRTYTWO_BIT_TC_MASK; break;
+#else
+ case 0: nFormat = Format::TWENTYFOUR_BIT_TC_MASK; break;
+#endif
}
m_aDevice = aDevPal.empty()
? createBitmapDevice( aDevSize, false, nFormat )