diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-02-07 09:49:10 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-02-07 10:08:30 +0100 |
commit | e5012e53b919ae4921d6d35660bde323a6f28417 (patch) | |
tree | d0ed24f56e29f5d027e21404696fca441cdd0fc5 /sd | |
parent | c99527385acf367c748b3dcf3e6a3bb8103f5eee (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 'sd')
-rw-r--r-- | sd/qa/unit/import-tests.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx index 9549076902e4..c54989eff192 100644 --- a/sd/qa/unit/import-tests.cxx +++ b/sd/qa/unit/import-tests.cxx @@ -1856,9 +1856,10 @@ bool checkPatternValues(std::vector<sal_uInt8>& rExpected, Bitmap& rBitmap) Bitmap::ScopedReadAccess pAccess(rBitmap); for (long y = 0; y < pAccess->Height(); ++y) { + Scanline pScanline = pAccess->GetScanline( y ); for (long x = 0; x < pAccess->Width(); ++x) { - Color aColor = pAccess->GetPixel(y, x).GetColor(); + Color aColor = pAccess->GetPixelFromData(pScanline, x).GetColor(); sal_uInt8 aValue = rExpected[y*8+x]; if (aValue == 1 && aColor != aFGColor) |