summaryrefslogtreecommitdiff
path: root/vcl/headless
diff options
context:
space:
mode:
authorTor Lillqvist <tlillqvist@suse.com>2012-06-11 20:02:11 +0300
committerTor Lillqvist <tlillqvist@suse.com>2012-06-12 13:50:49 +0300
commit96c4aeedb04bfb1438b69875951fc132142cb0d3 (patch)
treee78113f60d5c449ea6084c556e653d71b23e7fa6 /vcl/headless
parent56595dab6424db6d69f81bfa551118140c5b66ac (diff)
Implement XToolkit2::createScreenCompatibleDeviceUsingBuffer for Android
Change-Id: I8dd16850a35cd2de7260dcbe9a8aa7afae2294be
Diffstat (limited to 'vcl/headless')
-rw-r--r--vcl/headless/svpvd.cxx10
1 files changed, 9 insertions, 1 deletions
diff --git a/vcl/headless/svpvd.cxx b/vcl/headless/svpvd.cxx
index fb752e6f0f57..a0d6aaf759e0 100644
--- a/vcl/headless/svpvd.cxx
+++ b/vcl/headless/svpvd.cxx
@@ -57,6 +57,11 @@ void SvpSalVirtualDevice::ReleaseGraphics( SalGraphics* pGraphics )
sal_Bool SvpSalVirtualDevice::SetSize( long nNewDX, long nNewDY )
{
+ return SetSizeUsingBuffer( nNewDX, nNewDY, basebmp::RawMemorySharedArray() );
+}
+
+sal_Bool SvpSalVirtualDevice::SetSizeUsingBuffer( long nNewDX, long nNewDY, const basebmp::RawMemorySharedArray &pBuffer )
+{
B2IVector aDevSize( nNewDX, nNewDY );
if( aDevSize.getX() == 0 )
aDevSize.setX( 1 );
@@ -89,7 +94,10 @@ sal_Bool SvpSalVirtualDevice::SetSize( long nNewDX, long nNewDY )
#endif
}
m_aDevice = aDevPal.empty()
- ? createBitmapDevice( aDevSize, false, nFormat )
+ ? ( pBuffer
+ ? createBitmapDevice( aDevSize, false, nFormat, pBuffer, PaletteMemorySharedVector() )
+ : createBitmapDevice( aDevSize, false, nFormat )
+ )
: createBitmapDevice( aDevSize, false, nFormat, PaletteMemorySharedVector( new std::vector< basebmp::Color >(aDevPal) ) );
// update device in existing graphics