summaryrefslogtreecommitdiffstats
path: root/filter/source/msfilter/msdffimp.cxx
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 /filter/source/msfilter/msdffimp.cxx
parentMemoryByteGrabber sequence has to exist for Grabber lifetime (diff)
downloadcore-e5012e53b919ae4921d6d35660bde323a6f28417.tar.gz
core-e5012e53b919ae4921d6d35660bde323a6f28417.zip
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 'filter/source/msfilter/msdffimp.cxx')
-rw-r--r--filter/source/msfilter/msdffimp.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index 04864986d674..ffd6cfda2ef0 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -1378,13 +1378,14 @@ void DffPropertyReader::ApplyFillAttributes( SvStream& rIn, SfxItemSet& rSet, co
for (long y = 0; y < pWrite->Height(); ++y)
{
Scanline pScanline = pWrite->GetScanline(y);
+ Scanline pScanlineRead = pRead->GetScanline( y );
for (long x = 0; x < pWrite->Width(); ++x)
{
Color aReadColor;
if (pRead->HasPalette())
- aReadColor = pRead->GetPaletteColor(pRead->GetPixelIndex(y, x)).GetColor();
+ aReadColor = pRead->GetPaletteColor(pRead->GetIndexFromData(pScanlineRead, x)).GetColor();
else
- aReadColor = pRead->GetPixel(y, x).GetColor();
+ aReadColor = pRead->GetPixelFromData(pScanlineRead, x).GetColor();
if (aReadColor.GetColor() == 0)
pWrite->SetPixelOnData(pScanline, x, aCol2);