diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-03-16 10:37:12 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-03-16 12:07:32 +0100 |
commit | 494f565506013015d9ce4a3010eb3b211557d70f (patch) | |
tree | c2c01aa6cabb798ba09dd4a2ecec36b15b0676b3 /svx | |
parent | e568d233a3f9cbc926bfa12dac3fbc6d29a4b6c7 (diff) |
don't bother dithering for 256bit displays
which surely are a minority by now
Also drop the GetColorCount() method on OutputDevice and clean up the
remaining call sites to use GetBitCount()
Change-Id: I4e2c6f2523796f7df7f54eb005f1539e34d9ea40
Reviewed-on: https://gerrit.libreoffice.org/51389
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/dialog/graphctl.cxx | 20 | ||||
-rw-r--r-- | svx/source/xoutdev/_xoutbmp.cxx | 12 |
2 files changed, 1 insertions, 31 deletions
diff --git a/svx/source/dialog/graphctl.cxx b/svx/source/dialog/graphctl.cxx index 30a856a2780a..ac285f0d8305 100644 --- a/svx/source/dialog/graphctl.cxx +++ b/svx/source/dialog/graphctl.cxx @@ -163,25 +163,7 @@ void GraphCtrl::InitSdrModel() void GraphCtrl::SetGraphic( const Graphic& rGraphic, bool bNewModel ) { - // If possible we dither bitmaps for the display - if ( rGraphic.GetType() == GraphicType::Bitmap ) - { - if ( rGraphic.IsTransparent() ) - { - Bitmap aBmp( rGraphic.GetBitmap() ); - - DitherBitmap( aBmp ); - aGraphic = Graphic( BitmapEx( aBmp, rGraphic.GetBitmapEx().GetMask() ) ); - } - else - { - Bitmap aBmp( rGraphic.GetBitmap() ); - DitherBitmap( aBmp ); - aGraphic = aBmp; - } - } - else - aGraphic = rGraphic; + aGraphic = rGraphic; if ( aGraphic.GetPrefMapMode().GetMapUnit() == MapUnit::MapPixel ) aGraphSize = Application::GetDefaultDevice()->PixelToLogic( aGraphic.GetPrefSize(), aMap100 ); diff --git a/svx/source/xoutdev/_xoutbmp.cxx b/svx/source/xoutdev/_xoutbmp.cxx index a6e072197e8c..edc9e0a228f2 100644 --- a/svx/source/xoutdev/_xoutbmp.cxx +++ b/svx/source/xoutdev/_xoutbmp.cxx @@ -666,16 +666,4 @@ tools::Polygon XOutBitmap::GetContour( const Bitmap& rBmp, const XOutFlags nFlag return aRetPoly; } -bool DitherBitmap( Bitmap& rBitmap ) -{ - bool bRet = false; - - if( ( rBitmap.GetBitCount() >= 8 ) && ( Application::GetDefaultDevice()->GetColorCount() < 257 ) ) - bRet = rBitmap.Dither( BmpDitherFlags::Floyd ); - else - bRet = false; - - return bRet; -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |