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 /include/vcl/bitmapaccess.hxx | |
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 'include/vcl/bitmapaccess.hxx')
-rw-r--r-- | include/vcl/bitmapaccess.hxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/vcl/bitmapaccess.hxx b/include/vcl/bitmapaccess.hxx index 5ae64f8193cc..37eaef6dcda9 100644 --- a/include/vcl/bitmapaccess.hxx +++ b/include/vcl/bitmapaccess.hxx @@ -189,6 +189,11 @@ public: return mFncGetPixel( pData, nX, maColorMask ); } + sal_uInt8 GetIndexFromData(const sal_uInt8* pData, long nX) const + { + return GetPixelFromData( pData, nX ).GetIndex(); + } + void SetPixelOnData(sal_uInt8* pData, long nX, const BitmapColor& rBitmapColor) { assert(pData && "Access is not valid!"); |