summaryrefslogtreecommitdiff
path: root/vcl/source/gdi/bmpacc.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 /vcl/source/gdi/bmpacc.cxx
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 'vcl/source/gdi/bmpacc.cxx')
-rw-r--r--vcl/source/gdi/bmpacc.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/vcl/source/gdi/bmpacc.cxx b/vcl/source/gdi/bmpacc.cxx
index ad6b8ead20f2..74be5e1202b6 100644
--- a/vcl/source/gdi/bmpacc.cxx
+++ b/vcl/source/gdi/bmpacc.cxx
@@ -377,8 +377,9 @@ void BitmapWriteAccess::CopyScanline( long nY, const BitmapReadAccess& rReadAcc
{
// TODO: use fastbmp infrastructure
Scanline pScanline = GetScanline( nY );
+ Scanline pScanlineRead = rReadAcc.GetScanline(nY);
for( long nX = 0, nWidth = std::min( mpBuffer->mnWidth, rReadAcc.Width() ); nX < nWidth; nX++ )
- SetPixelOnData( pScanline, nX, rReadAcc.GetPixel( nY, nX ) );
+ SetPixelOnData( pScanline, nX, rReadAcc.GetPixelFromData( pScanlineRead, nX ) );
}
}