summaryrefslogtreecommitdiff
path: root/svx/source/svdraw
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-02-07 09:49:10 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-02-07 10:08:30 +0100
commite5012e53b919ae4921d6d35660bde323a6f28417 (patch)
treed0ed24f56e29f5d027e21404696fca441cdd0fc5 /svx/source/svdraw
parentc99527385acf367c748b3dcf3e6a3bb8103f5eee (diff)
use scanline when reading pixel data
extracts code from the innermost part of fairly hot loops And add a GetIndexFromData method to make the call sites a little easier to read. Change-Id: I4ce5c5a687ecdb6982562a0aafce8513d86f9107 Reviewed-on: https://gerrit.libreoffice.org/49337 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/svdraw')
-rw-r--r--svx/source/svdraw/svdfmtf.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx
index 28fbb9635725..9197c1f7eea4 100644
--- a/svx/source/svdraw/svdfmtf.cxx
+++ b/svx/source/svdraw/svdfmtf.cxx
@@ -1588,7 +1588,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaFloatTransparentAction const & rAct)
Scanline pScanline = pOld->GetScanline( y );
for(long x(0); x < pOld->Width(); x++)
{
- const double fOpOld(1.0 - (pOld->GetPixel(y, x).GetIndex() * fFactor));
+ const double fOpOld(1.0 - (pOld->GetIndexFromData(pScanline, x) * fFactor));
const sal_uInt8 aCol(basegfx::fround((1.0 - (fOpOld * fOpNew)) * 255.0));
pOld->SetPixelOnData(pScanline, x, BitmapColor(aCol));
@@ -1608,8 +1608,8 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaFloatTransparentAction const & rAct)
Scanline pScanline = pOld->GetScanline( y );
for(long x(0); x < pOld->Width(); x++)
{
- const double fOpOld(1.0 - (pOld->GetPixel(y, x).GetIndex() * fFactor));
- const double fOpNew(1.0 - (pNew->GetPixel(y, x).GetIndex() * fFactor));
+ const double fOpOld(1.0 - (pOld->GetIndexFromData(pScanline, x) * fFactor));
+ const double fOpNew(1.0 - (pNew->GetIndexFromData(pScanline, x) * fFactor));
const sal_uInt8 aCol(basegfx::fround((1.0 - (fOpOld * fOpNew)) * 255.0));
pOld->SetPixelOnData(pScanline, x, BitmapColor(aCol));