summaryrefslogtreecommitdiff
path: root/vcl/headless/svpbmp.cxx
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2024-02-26 21:45:35 +0900
committerTomaž Vajngerl <quikee@gmail.com>2024-02-29 16:12:18 +0100
commit6588c30ed4477627b2623560ca867682b189bc80 (patch)
treeb031e5611af09af708de9ebb9b218b958fbec92a /vcl/headless/svpbmp.cxx
parent657631791421eae2c88a89da27bd2c0dc1822175 (diff)
vcl: separate scanline direction from ScanlineFormat
ScanlineFormat enum is used to indicate 2 things - scanline format type and scanline direction (TopDown or BottomUp). This makes it complex to manipulate with (using bit arithmetics) and hard to use in general for no benefit, so this commit separates direction out from the ScanlineFormat into ScanlineDirection enum. ScanlineFormat is now just a simple enum class (not a bit field). Change-Id: Iad55d0a4c8c07b71221c2facf7cf6a2d518fec0c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163943 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'vcl/headless/svpbmp.cxx')
-rw-r--r--vcl/headless/svpbmp.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/vcl/headless/svpbmp.cxx b/vcl/headless/svpbmp.cxx
index 178ea129c655..328822f78c77 100644
--- a/vcl/headless/svpbmp.cxx
+++ b/vcl/headless/svpbmp.cxx
@@ -57,17 +57,17 @@ static std::optional<BitmapBuffer> ImplCreateDIB(
switch (ePixelFormat)
{
case vcl::PixelFormat::N8_BPP:
- pDIB->mnFormat = ScanlineFormat::N8BitPal;
+ pDIB->meFormat = ScanlineFormat::N8BitPal;
break;
case vcl::PixelFormat::N24_BPP:
- pDIB->mnFormat = SVP_24BIT_FORMAT;
+ pDIB->meFormat = SVP_24BIT_FORMAT;
break;
case vcl::PixelFormat::N32_BPP:
- pDIB->mnFormat = SVP_CAIRO_FORMAT;
+ pDIB->meFormat = SVP_CAIRO_FORMAT;
break;
case vcl::PixelFormat::INVALID:
assert(false);
- pDIB->mnFormat = SVP_CAIRO_FORMAT;
+ pDIB->meFormat = SVP_CAIRO_FORMAT;
break;
}
@@ -75,7 +75,7 @@ static std::optional<BitmapBuffer> ImplCreateDIB(
if (ePixelFormat <= vcl::PixelFormat::N8_BPP)
nColors = vcl::numberOfColors(ePixelFormat);
- pDIB->mnFormat |= ScanlineFormat::TopDown;
+ pDIB->meDirection = ScanlineDirection::TopDown;
pDIB->mnWidth = rSize.Width();
pDIB->mnHeight = rSize.Height();
tools::Long nScanlineBase;