diff options
author | Tor Lillqvist <tml@collabora.com> | 2014-04-09 10:01:34 +0300 |
---|---|---|
committer | Chris Sherlock <chris.sherlock79@gmail.com> | 2014-04-10 11:42:41 +0000 |
commit | cb10a184b96b0f52ac8aa2b10b3dc218e76e752d (patch) | |
tree | 2bcca57d46bfb68efa3f6c810d3a803f9eb71f97 | |
parent | 0d8e3a145901ab0124d40d33a50e2de28dc0c8ab (diff) |
Kill the ImplSVGDIData::mbNoXORClipping flag
Instead, act as if it was true on all platforms. Don't do XOR clipping on any
platform. Simpler code is better code, and XOR tricks are generally very much
out of fashion these days, I have been told. Didn't seem to have any visible
ill effects on Linux at least.
Change-Id: I6192006c77a4a81363ec7b3292f72d512d5e9b53
Reviewed-on: https://gerrit.libreoffice.org/8901
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
-rw-r--r-- | include/vcl/outdev.hxx | 1 | ||||
-rw-r--r-- | vcl/inc/svdata.hxx | 1 | ||||
-rw-r--r-- | vcl/ios/iosinst.cxx | 1 | ||||
-rw-r--r-- | vcl/osx/salinst.cxx | 1 | ||||
-rw-r--r-- | vcl/source/gdi/outdev4.cxx | 59 |
5 files changed, 1 insertions, 62 deletions
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx index 3c10cbd4fc9e..be31840d8268 100644 --- a/include/vcl/outdev.hxx +++ b/include/vcl/outdev.hxx @@ -843,7 +843,6 @@ protected: virtual void ClipAndDrawGradientToBounds( Gradient &rGradient, const PolyPolygon &rPolyPoly ); void ClipAndDrawGradient( Gradient &rGradient, const PolyPolygon &rPolyPoly ); - void XORClipAndDrawGradient( Gradient &rGradient, const PolyPolygon &rPolyPoly ); virtual void ClipAndDrawGradientMetafile ( const Gradient &rGradient, const PolyPolygon &rPolyPoly ); diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx index 706271fb1507..0ba6ee62b510 100644 --- a/vcl/inc/svdata.hxx +++ b/vcl/inc/svdata.hxx @@ -175,7 +175,6 @@ struct ImplSVGDIData long mnAppFontY; // AppFont Y-Numenator for 80/tel Height bool mbFontSubChanged; // true: FontSubstitution was changed between Begin/End bool mbNativeFontConfig; // true: do not override UI font - bool mbNoXORClipping; // true: do not use XOR to achieve clipping effects }; struct ImplSVWinData diff --git a/vcl/ios/iosinst.cxx b/vcl/ios/iosinst.cxx index fca7062faa7a..91735bb6b4a6 100644 --- a/vcl/ios/iosinst.cxx +++ b/vcl/ios/iosinst.cxx @@ -265,7 +265,6 @@ SalInstance *CreateSalInstance() IosSalInstance* pInstance = new IosSalInstance( new SalYieldMutex() ); new IosSalData( pInstance ); pInstance->AcquireYieldMutex(1); - ImplGetSVData()->maGDIData.mbNoXORClipping = true; ImplGetSVData()->maWinData.mbNoSaveBackground = true; return pInstance; } diff --git a/vcl/osx/salinst.cxx b/vcl/osx/salinst.cxx index 4414bef1cfff..7b1014114360 100644 --- a/vcl/osx/salinst.cxx +++ b/vcl/osx/salinst.cxx @@ -336,7 +336,6 @@ SalInstance* CreateSalInstance() ImplGetSVData()->maNWFData.mbProgressNeedsErase = true; ImplGetSVData()->maNWFData.mbCheckBoxNeedsErase = true; ImplGetSVData()->maNWFData.mnStatusBarLowerRightOffset = 10; - ImplGetSVData()->maGDIData.mbNoXORClipping = true; ImplGetSVData()->maWinData.mbNoSaveBackground = true; return pInst; diff --git a/vcl/source/gdi/outdev4.cxx b/vcl/source/gdi/outdev4.cxx index f5ae9a7316db..a37138485cd1 100644 --- a/vcl/source/gdi/outdev4.cxx +++ b/vcl/source/gdi/outdev4.cxx @@ -722,10 +722,7 @@ void OutputDevice::ClipAndDrawGradientMetafile ( const Gradient &rGradient, cons void OutputDevice::ClipAndDrawGradientToBounds ( Gradient &rGradient, const PolyPolygon &rPolyPoly ) { - if( ImplGetSVData()->maGDIData.mbNoXORClipping ) - ClipAndDrawGradient ( rGradient, rPolyPoly ); - else - XORClipAndDrawGradient ( rGradient, rPolyPoly ); + ClipAndDrawGradient ( rGradient, rPolyPoly ); } void OutputDevice::ClipAndDrawGradient ( Gradient &rGradient, const PolyPolygon &rPolyPoly ) @@ -773,60 +770,6 @@ void OutputDevice::ClipAndDrawGradient ( Gradient &rGradient, const PolyPolygon } } -void OutputDevice::XORClipAndDrawGradient ( Gradient &rGradient, const PolyPolygon &rPolyPoly ) -{ - const PolyPolygon aPolyPoly( LogicToPixel( rPolyPoly ) ); - const Rectangle aBoundRect( rPolyPoly.GetBoundRect() ); - Point aPoint; - Rectangle aDstRect( aPoint, GetOutputSizePixel() ); - - aDstRect.Intersection( aBoundRect ); - - ClipToPaintRegion( aDstRect ); - - if( !aDstRect.IsEmpty() ) - { - boost::scoped_ptr<VirtualDevice> pVDev; - const Size aDstSize( aDstRect.GetSize() ); - - if( HasAlpha() ) - { - // #110958# Pay attention to alpha VDevs here, otherwise, - // background will be wrong: Temp VDev has to have alpha, too. - pVDev.reset(new VirtualDevice( *this, 0, GetAlphaBitCount() > 1 ? 0 : 1 )); - } - else - { - // nothing special here. Plain VDev - pVDev.reset(new VirtualDevice()); - } - - if( pVDev->SetOutputSizePixel( aDstSize) ) - { - MapMode aVDevMap; - const bool bOldMap = mbMap; - - EnableMapMode( false ); - - pVDev->DrawOutDev( Point(), aDstSize, aDstRect.TopLeft(), aDstSize, *this ); - pVDev->SetRasterOp( ROP_XOR ); - aVDevMap.SetOrigin( Point( -aDstRect.Left(), -aDstRect.Top() ) ); - pVDev->SetMapMode( aVDevMap ); - pVDev->DrawGradient( aBoundRect, rGradient ); - pVDev->SetFillColor( COL_BLACK ); - pVDev->SetRasterOp( ROP_0 ); - pVDev->DrawPolyPolygon( aPolyPoly ); - pVDev->SetRasterOp( ROP_XOR ); - pVDev->DrawGradient( aBoundRect, rGradient ); - aVDevMap.SetOrigin( Point() ); - pVDev->SetMapMode( aVDevMap ); - DrawOutDev( aDstRect.TopLeft(), aDstSize, Point(), aDstSize, *pVDev ); - - EnableMapMode( bOldMap ); - } - } -} - void OutputDevice::DrawGradient( const PolyPolygon& rPolyPoly, const Gradient& rGradient ) { |