summaryrefslogtreecommitdiff
path: root/include/vcl/bitmapaccess.hxx
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 /include/vcl/bitmapaccess.hxx
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 'include/vcl/bitmapaccess.hxx')
-rw-r--r--include/vcl/bitmapaccess.hxx5
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!");