summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2021-03-27 10:14:13 +0900
committerTomaž Vajngerl <quikee@gmail.com>2021-04-02 06:28:39 +0200
commit88a177f827eba204dea92b631032411de8213ee4 (patch)
tree3107896970ac35f9fd1cb3804634efdef78c2313 /drawinglayer
parent465b8b0e9ad4b0c9c7701dee2820a99c5d00b5bf (diff)
vcl: remove GetBitCount and GetColorCount from Bitmap{Ex}
We can cast the PixelFormat enum to int for the same information and we can use the enum to reduce ambiguity when possible. Change-Id: I6ea648139465568cdeb12e5f5f75c7b609365bf4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113188 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/source/processor2d/vclprocessor2d.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx
index 80c7fbdb6556..5bd7e0194b66 100644
--- a/drawinglayer/source/processor2d/vclprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx
@@ -470,7 +470,7 @@ void VclProcessor2D::RenderFillGraphicPrimitive2D(
// if color depth is below 24bit, expand before scaling for better quality.
// This is even needed for low colors, else the scale will produce
// a bitmap in gray or Black/White (!)
- if (aBitmapEx.GetBitCount() < 24)
+ if (isPalettePixelFormat(aBitmapEx.getPixelFormat()))
{
aBitmapEx.Convert(BmpConversion::N24Bit);
}