[Libreoffice-commits] core.git: vcl/quartz
Stephan Bergmann (via logerrit)
logerrit at kemper.freedesktop.org
Sun Nov 15 16:17:07 UTC 2020
vcl/quartz/salgdiutils.cxx | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
New commits:
commit f9c6a153c95c4acc6ba02e660c6ca51166b4c79a
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Thu Nov 12 15:06:38 2020 +0100
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Sun Nov 15 17:16:24 2020 +0100
-Werror,-Wdeprecated-anon-enum-enum-conversion
...even though CGBitmapContextCreate is documented to take a mixture of
CGImageAlphaInfo and CGBitmapInfo flags; so convert all to the uint32_t
CGBitmapContextCreate bitmapInfo parameter type
Change-Id: Ic6630c68760fe29b6abf6053e80a852a31349839
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105755
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/vcl/quartz/salgdiutils.cxx b/vcl/quartz/salgdiutils.cxx
index 751b14c94921..985fe38a2d11 100644
--- a/vcl/quartz/salgdiutils.cxx
+++ b/vcl/quartz/salgdiutils.cxx
@@ -18,6 +18,9 @@
*/
#include <sal/config.h>
+
+#include <cstdint>
+
#include <sal/log.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
@@ -155,14 +158,16 @@ bool AquaSalGraphics::CheckContext()
const CGSize aLayerSize = { static_cast<CGFloat>(nScaledWidth), static_cast<CGFloat>(nScaledHeight) };
const int nBytesPerRow = (nBitmapDepth * nScaledWidth) / 8;
- int nFlags = kCGImageAlphaNoneSkipFirst | kCGBitmapByteOrder32Host;
+ std::uint32_t nFlags = std::uint32_t(kCGImageAlphaNoneSkipFirst)
+ | std::uint32_t(kCGBitmapByteOrder32Host);
maBGContextHolder.set(CGBitmapContextCreate(
nullptr, nScaledWidth, nScaledHeight, 8, nBytesPerRow, GetSalData()->mxRGBSpace, nFlags));
maLayer.set(CGLayerCreateWithContext(maBGContextHolder.get(), aLayerSize, nullptr));
maLayer.setScale(fScale);
- nFlags = kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host;
+ nFlags = std::uint32_t(kCGImageAlphaPremultipliedFirst)
+ | std::uint32_t(kCGBitmapByteOrder32Host);
maCSContextHolder.set(CGBitmapContextCreate(
nullptr, nScaledWidth, nScaledHeight, 8, nBytesPerRow, GetSalData()->mxRGBSpace, nFlags));
More information about the Libreoffice-commits
mailing list