summaryrefslogtreecommitdiff
path: root/vcl/headless
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2014-03-24 19:02:37 +0200
committerTor Lillqvist <tml@collabora.com>2014-03-26 10:15:42 +0200
commit628b07cfc0417e87a6f2558543608aba04089d6a (patch)
treefe3d33a445113db8482936e927a8ca8aefaa0f79 /vcl/headless
parent99a79ef856fb6b02196f71e67907a6a45940de01 (diff)
Seems we don't need any basebmp stuff in AquaSalGraphics on iOS
No repeatable visible differences in TiledLibreOffice for my test docs. Probably we should unify the iOS vcl code even harder with the OS X code, get rid of the last remains of the pre-tiled-rendering basebmp bitmap-based stuff. Change-Id: I2484585d3d0ef5ce758d0a654717d23464464c1a
Diffstat (limited to 'vcl/headless')
-rw-r--r--vcl/headless/svpframe.cxx6
-rw-r--r--vcl/headless/svpgdi.cxx35
2 files changed, 11 insertions, 30 deletions
diff --git a/vcl/headless/svpframe.cxx b/vcl/headless/svpframe.cxx
index 68aa4d0f603e..6e12d6aeacd1 100644
--- a/vcl/headless/svpframe.cxx
+++ b/vcl/headless/svpframe.cxx
@@ -170,7 +170,9 @@ void SvpSalFrame::LoseFocus()
SalGraphics* SvpSalFrame::AcquireGraphics()
{
SvpSalGraphics* pGraphics = new SvpSalGraphics();
+#ifndef IOS
pGraphics->setDevice( m_aFrame );
+#endif
m_aGraphics.push_back( pGraphics );
return pGraphics;
}
@@ -293,7 +295,11 @@ void SvpSalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_u
// update device in existing graphics
for( std::list< SvpSalGraphics* >::iterator it = m_aGraphics.begin();
it != m_aGraphics.end(); ++it )
+ {
+#ifndef IOS
(*it)->setDevice( m_aFrame );
+#endif
+ }
}
if( m_bVisible )
m_pInstance->PostEvent( this, NULL, SALEVENT_RESIZE );
diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx
index 4ba8ca01b878..e7c458c3f96c 100644
--- a/vcl/headless/svpgdi.cxx
+++ b/vcl/headless/svpgdi.cxx
@@ -88,9 +88,6 @@ bool SvpSalGraphics::drawAlphaRect( long /*nX*/, long /*nY*/, long /*nWidth*/, l
// TODO(P3) implement alpha blending
return false;
}
-#endif
-
-#ifndef IOS
SvpSalGraphics::SvpSalGraphics() :
m_bUseLineColor( true ),
@@ -110,14 +107,11 @@ SvpSalGraphics::~SvpSalGraphics()
{
}
-#endif
-
void SvpSalGraphics::setDevice( basebmp::BitmapDeviceSharedPtr& rDevice )
{
m_aOrigDevice = rDevice;
ResetClipRegion();
-#ifndef IOS
// determine matching bitmap format for masks
basebmp::Format nDeviceFmt = m_aDevice->getScanlineFormat();
switch( nDeviceFmt )
@@ -136,9 +130,10 @@ void SvpSalGraphics::setDevice( basebmp::BitmapDeviceSharedPtr& rDevice )
m_eTextFmt = basebmp::FORMAT_ONE_BIT_LSB_GREY;
break;
}
-#endif
}
+#endif
+
void SvpSalGraphics::GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY )
{
rDPIX = rDPIY = 96;
@@ -151,8 +146,6 @@ sal_uInt16 SvpSalGraphics::GetBitCount() const
return SvpSalBitmap::getBitCountFromScanlineFormat( m_aDevice->getScanlineFormat() );
}
-#endif
-
long SvpSalGraphics::GetGraphicsWidth() const
{
if( m_aDevice.get() )
@@ -163,8 +156,6 @@ long SvpSalGraphics::GetGraphicsWidth() const
return 0;
}
-#ifndef IOS
-
void SvpSalGraphics::ResetClipRegion()
{
m_aDevice = m_aOrigDevice;
@@ -174,8 +165,6 @@ void SvpSalGraphics::ResetClipRegion()
}
-#endif
-
// verify clip for the whole area is setup
void SvpSalGraphics::ensureClip()
{
@@ -284,8 +273,6 @@ bool SvpSalGraphics::isClippedSetup( const basegfx::B2IBox &aRange, SvpSalGraphi
return false;
}
-#ifndef IOS
-
// Clipping by creating unconditional mask bitmaps is horribly
// slow so defer it, as much as possible. It is common to get
// 3 rectangles pushed, and have to create a vast off-screen
@@ -389,7 +376,6 @@ void SvpSalGraphics::SetROPFillColor( SalROPColor nROPColor )
}
-#ifndef IOS
void SvpSalGraphics::drawPixel( long nX, long nY )
{
if( m_bUseLineColor )
@@ -562,8 +548,6 @@ bool SvpSalGraphics::drawPolyPolygon( const basegfx::B2DPolyPolygon&, double /*f
return false;
}
-#endif
-
void SvpSalGraphics::copyArea( long nDestX,
long nDestY,
long nSrcX,
@@ -603,7 +587,6 @@ void SvpSalGraphics::copyBits( const SalTwoRect& rPosAry,
dbgOut( m_aDevice );
}
-#ifndef IOS
void SvpSalGraphics::drawBitmap( const SalTwoRect& rPosAry,
const SalBitmap& rSalBitmap )
{
@@ -678,8 +661,6 @@ void SvpSalGraphics::drawMask( const SalTwoRect& rPosAry,
dbgOut( m_aDevice );
}
-#endif
-
SalBitmap* SvpSalGraphics::getBitmap( long nX, long nY, long nWidth, long nHeight )
{
basebmp::BitmapDeviceSharedPtr aCopy =
@@ -697,16 +678,12 @@ SalBitmap* SvpSalGraphics::getBitmap( long nX, long nY, long nWidth, long nHeigh
return pBitmap;
}
-#endif
-
SalColor SvpSalGraphics::getPixel( long nX, long nY )
{
basebmp::Color aColor( m_aOrigDevice->getPixel( basegfx::B2IPoint( nX, nY ) ) );
return aColor.toInt32();
}
-#ifndef IOS
-
void SvpSalGraphics::invert( long nX, long nY, long nWidth, long nHeight, SalInvert /*nFlags*/ )
{
// FIXME: handle SAL_INVERT_50 and SAL_INVERT_TRACKFRAME
@@ -740,13 +717,13 @@ bool SvpSalGraphics::drawEPS( long, long, long, long, void*, sal_uLong )
return false;
}
+#ifndef IOS
+
SystemGraphicsData SvpSalGraphics::GetGraphicsData() const
{
return SystemGraphicsData();
}
-#ifndef IOS
-
bool SvpSalGraphics::supportsOperation( OutDevSupportType ) const
{
return false;
@@ -756,10 +733,8 @@ bool SvpSalGraphics::supportsOperation( OutDevSupportType ) const
#ifdef IOS
-void SvpSalGraphics::RefreshRect(float lX, float lY, float lWidth, float lHeight)
+void SvpSalGraphics::RefreshRect(float /* lX */, float /* lY */, float /* lWidth */, float /* lHeight */)
{
- if (m_aDevice && m_aDevice->getDamageTracker() != NULL)
- m_aDevice->getDamageTracker()->damaged(basegfx::B2IBox( basegfx::fround(lX), basegfx::fround(lY), basegfx::fround(lX + lWidth), basegfx::fround(lY + lHeight)));
}
#endif