vcl/source/gdi/impbmp.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit 7ec5073951cf7b7f71369e0819f82ae2fc6971ac Author: Daniel Robertson <danlrobertso...@gmail.com> Date: Tue Nov 3 12:22:29 2015 -0500 vcl: ImpBitmap optimize GetBitCount Use binary search to find ImpBitmap BitCount in constant time. Change-Id: Ica13d41d1473e01c9198c985d34206267d7910d1 Reviewed-on: https://gerrit.libreoffice.org/19759 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: jan iversen <j...@documentfoundation.org> Tested-by: jan iversen <j...@documentfoundation.org> diff --git a/vcl/source/gdi/impbmp.cxx b/vcl/source/gdi/impbmp.cxx index b79b0d4..ad1eca9 100644 --- a/vcl/source/gdi/impbmp.cxx +++ b/vcl/source/gdi/impbmp.cxx @@ -76,7 +76,8 @@ Size ImpBitmap::ImplGetSize() const sal_uInt16 ImpBitmap::ImplGetBitCount() const { sal_uInt16 nBitCount = mpSalBitmap->GetBitCount(); - return( ( nBitCount <= 1 ) ? 1 : ( nBitCount <= 4 ) ? 4 : ( nBitCount <= 8 ) ? 8 : 24 ); + return ( nBitCount <= 4 ) ? ( ( nBitCount <= 1 ) ? 1 : 4 ): + ( ( nBitCount <= 8 ) ? 8 : 24); } BitmapBuffer* ImpBitmap::ImplAcquireBuffer( BitmapAccessMode nMode ) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits