vcl/inc/skia/x11/gdiimpl.hxx | 6 +----- vcl/unx/generic/app/salinst.cxx | 16 ++++++++-------- vcl/unx/generic/gdi/salgdi.cxx | 14 +++++++------- 3 files changed, 16 insertions(+), 20 deletions(-)
New commits: commit cab4a0166a81749ba025be6e1ab39203bdee1e10 Author: Luboš Luňák <l.lu...@collabora.com> AuthorDate: Tue Nov 30 09:04:00 2021 +0100 Commit: Luboš Luňák <l.lu...@collabora.com> CommitDate: Tue Nov 30 11:18:35 2021 +0100 workaround gcc bug #55776 about enum class shadowing a global GCC warns that 'enum class XorMode { None }' shadows 'constexpr int None = 0' for a workaround for X11 headers, even though there's no case for confusion here. So instead of a workaround for X11 headers work this around by placing the enum first, and then GCC does not complain. Change-Id: I3e7cfaced957d47dee8cc4f10ee74e8dd97a5cc5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126083 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lu...@collabora.com> diff --git a/vcl/inc/skia/x11/gdiimpl.hxx b/vcl/inc/skia/x11/gdiimpl.hxx index c2cb69649dab..f7198671b4d6 100644 --- a/vcl/inc/skia/x11/gdiimpl.hxx +++ b/vcl/inc/skia/x11/gdiimpl.hxx @@ -12,13 +12,9 @@ #include <vcl/dllapi.h> +#include <skia/gdiimpl.hxx> #include <unx/salgdi.h> #include <unx/x11/x11gdiimpl.h> -// X11 headers -constexpr int XNone = None; -#undef None -constexpr int None = XNone; -#include <skia/gdiimpl.hxx> class VCL_PLUGIN_PUBLIC X11SkiaSalGraphicsImpl final : public SkiaSalGraphicsImpl, public X11GraphicsImpl diff --git a/vcl/unx/generic/app/salinst.cxx b/vcl/unx/generic/app/salinst.cxx index 54d20d2a8e7a..437614f35177 100644 --- a/vcl/unx/generic/app/salinst.cxx +++ b/vcl/unx/generic/app/salinst.cxx @@ -19,6 +19,14 @@ #include <stdlib.h> +#include <config_features.h> +#include <vcl/skia/SkiaHelper.hxx> +#include <config_skia.h> +#if HAVE_FEATURE_SKIA +#include <skia/x11/gdiimpl.hxx> +#include <skia/salbmp.hxx> +#endif + #include <unx/saldata.hxx> #include <unx/saldisp.hxx> #include <unx/salinst.h> @@ -33,14 +41,6 @@ #include <salwtype.hxx> -#include <config_features.h> -#include <vcl/skia/SkiaHelper.hxx> -#include <config_skia.h> -#if HAVE_FEATURE_SKIA -#include <skia/x11/gdiimpl.hxx> -#include <skia/salbmp.hxx> -#endif - // plugin factory function extern "C" { diff --git a/vcl/unx/generic/gdi/salgdi.cxx b/vcl/unx/generic/gdi/salgdi.cxx index fd930bd10cfd..d65313843155 100644 --- a/vcl/unx/generic/gdi/salgdi.cxx +++ b/vcl/unx/generic/gdi/salgdi.cxx @@ -17,6 +17,13 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_features.h> +#include <vcl/skia/SkiaHelper.hxx> +#if HAVE_FEATURE_SKIA +#include <skia/x11/gdiimpl.hxx> +#include <skia/x11/textrender.hxx> +#endif + #include <X11/Xlib.h> #include <X11/Xutil.h> #include <X11/extensions/Xrender.h> @@ -50,13 +57,6 @@ #include "cairo_xlib_cairo.hxx" #include <cairo-xlib.h> -#include <config_features.h> -#include <vcl/skia/SkiaHelper.hxx> -#if HAVE_FEATURE_SKIA -#include <skia/x11/gdiimpl.hxx> -#include <skia/x11/textrender.hxx> -#endif - X11SalGraphics::X11SalGraphics(): m_pFrame(nullptr), m_pVDev(nullptr),