summaryrefslogtreecommitdiff
path: root/emfio
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2018-01-30 20:40:19 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-02-06 07:39:11 +0100
commit3e0efdb50cd9bcf1749993607330ea1567eb33a2 (patch)
treec740dfc9b598480d5168282154045bbc938f6862 /emfio
parentf38e35338e3010f137d7b35fa3150792fabfa825 (diff)
convert SetPixel->SetPixelOnData
by extracting out the Y scanline computation from the innermost loop. Inspired by commit 078d01c1b6cb9bbd80aeadc49a71cc817413164c. Change-Id: Ic3c1827c01ed3aec629975749a551c7a68ae4a5e Reviewed-on: https://gerrit.libreoffice.org/48926 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'emfio')
-rw-r--r--emfio/source/reader/wmfreader.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/emfio/source/reader/wmfreader.cxx b/emfio/source/reader/wmfreader.cxx
index 5b4353f77132..e0822757eefe 100644
--- a/emfio/source/reader/wmfreader.cxx
+++ b/emfio/source/reader/wmfreader.cxx
@@ -688,6 +688,7 @@ namespace emfio
{
for (sal_uInt16 y = 0; y < nHeight && mpInputStream->good(); ++y)
{
+ Scanline pScanline = pAcc->GetScanline( y );
sal_uInt16 x = 0;
for (sal_uInt16 scan = 0; scan < nBytesPerScan; scan++ )
{
@@ -697,7 +698,7 @@ namespace emfio
{
if ( x < nWidth )
{
- pAcc->SetPixelIndex( y, x, (nEightPixels>>i)&1 );
+ pAcc->SetPixelOnData( pScanline, x, BitmapColor((nEightPixels>>i)&1) );
}
x++;
}