vcl/Library_vclplug_gen.mk                      |    1 
 vcl/headless/CairoCommon.cxx                    |    3 -
 vcl/inc/salgdiimpl.hxx                          |    2 
 vcl/inc/unx/salgdi.h                            |    4 -
 vcl/unx/generic/gdi/X11CairoSalGraphicsImpl.hxx |    2 
 vcl/unx/generic/gdi/gdiimpl.cxx                 |   62 ------------------------
 vcl/unx/generic/gdi/gdiimpl.hxx                 |   54 --------------------
 vcl/unx/generic/gdi/salgdi.cxx                  |   13 -----
 8 files changed, 5 insertions(+), 136 deletions(-)

New commits:
commit 171f6e048c171cbf6a00cdf95a447ce6f074b6a0
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Mon Jan 2 20:38:35 2023 +0000
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Thu Jan 12 12:33:34 2023 +0000

    make SupportsCairo always return true now
    
    Change-Id: I818c63aadd23256c183b89a69b77ac8cdcc081f2
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144968
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/vcl/inc/unx/salgdi.h b/vcl/inc/unx/salgdi.h
index 18c4f774a3df..db6f59f1b867 100644
--- a/vcl/inc/unx/salgdi.h
+++ b/vcl/inc/unx/salgdi.h
@@ -72,8 +72,6 @@ public:
 
     X11Common();
 
-    bool SupportsCairo() const;
-
     const SalColormap& GetColormap() const { return *m_pColormap; }
     const SalDisplay* GetDisplay() const { return GetColormap().GetDisplay(); }
     const SalVisual& GetVisual() const { return GetColormap().GetVisual(); }
diff --git a/vcl/unx/generic/gdi/salgdi.cxx b/vcl/unx/generic/gdi/salgdi.cxx
index 3a1f9bca5412..7908d04e2164 100644
--- a/vcl/unx/generic/gdi/salgdi.cxx
+++ b/vcl/unx/generic/gdi/salgdi.cxx
@@ -66,16 +66,6 @@ X11Common::X11Common()
     , m_pColormap(nullptr)
 {}
 
-bool X11Common::SupportsCairo() const
-{
-    static bool bSupportsCairo = [this] {
-        Display *pDisplay = GetXDisplay();
-        int nDummy;
-        return XQueryExtension(pDisplay, "RENDER", &nDummy, &nDummy, &nDummy);
-    }();
-    return bSupportsCairo;
-}
-
 // X11SalGraphics
 
 X11SalGraphics::X11SalGraphics():
@@ -236,7 +226,7 @@ void X11SalGraphics::Flush()
 
 bool X11SalGraphics::SupportsCairo() const
 {
-    return maX11Common.SupportsCairo();
+    return true;
 }
 
 cairo::SurfaceSharedPtr X11SalGraphics::CreateSurface(const 
cairo::CairoSurfaceSharedPtr& rSurface) const
commit 9d1e4cbf481c643e1674a493e4911e17d12a98f7
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Wed Jan 11 11:13:35 2023 +0000
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Thu Jan 12 12:33:22 2023 +0000

    remove newly unused X11SalGraphicsImpl
    
    Change-Id: I91d5c75f38a6798e6c4a3ce10d21fede558d27db
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145337
    Tested-by: Caolán McNamara <caol...@redhat.com>
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/vcl/Library_vclplug_gen.mk b/vcl/Library_vclplug_gen.mk
index c117fb3bbee4..cc94f6f7c09d 100644
--- a/vcl/Library_vclplug_gen.mk
+++ b/vcl/Library_vclplug_gen.mk
@@ -99,7 +99,6 @@ $(eval $(call gb_Library_add_exception_objects,vclplug_gen,\
     vcl/unx/generic/dtrans/X11_transferable \
     vcl/unx/generic/gdi/cairo_xlib_cairo \
     vcl/unx/generic/gdi/X11CairoSalGraphicsImpl \
-    vcl/unx/generic/gdi/gdiimpl \
     vcl/unx/generic/gdi/salgdi2 \
     vcl/unx/generic/gdi/font \
     vcl/unx/generic/gdi/salgdi \
diff --git a/vcl/headless/CairoCommon.cxx b/vcl/headless/CairoCommon.cxx
index 90f10bfdaa25..a646ebd8d67a 100644
--- a/vcl/headless/CairoCommon.cxx
+++ b/vcl/headless/CairoCommon.cxx
@@ -813,7 +813,8 @@ void CairoCommon::drawRect(double nX, double nY, double 
nWidth, double nHeight,
 
     if (aOrigLineColor)
     {
-        // need same -1 hack as X11SalGraphicsImpl::drawRect
+        // need -1 hack to exclude the bottom and right edges to act like 
wingdi "Rectangle"
+        // function which is what this was probably the ultimate origin of 
this behavior
         basegfx::B2DPolygon aRect = basegfx::utils::createPolygonFromRect(
             basegfx::B2DRectangle(nX, nY, nX + nWidth - 1, nY + nHeight - 1));
 
diff --git a/vcl/inc/salgdiimpl.hxx b/vcl/inc/salgdiimpl.hxx
index 5cdd4bd7f50a..314156da0d0b 100644
--- a/vcl/inc/salgdiimpl.hxx
+++ b/vcl/inc/salgdiimpl.hxx
@@ -43,7 +43,7 @@ Implementation class for SalGraphics.
 
 This class allows having an implementation of drawing calls that is separate 
from SalGraphics,
 and SalGraphics can forward all such calls to SalGraphicsImpl. For example 
X11SalGraphics
-may internally use either Xlib-based X11SalGraphicsImpl or Skia-based 
SkiaSalGraphicsImpl,
+may internally use either Cairo-based X11CairoSalGraphicsImpl or Skia-based 
SkiaSalGraphicsImpl,
 and the latter may be used also by other SalGraphics implementations. All the 
functions
 here should be implementations of the relevant SalGraphics functions.
 */
diff --git a/vcl/inc/unx/salgdi.h b/vcl/inc/unx/salgdi.h
index ec2fe34628c2..18c4f774a3df 100644
--- a/vcl/inc/unx/salgdi.h
+++ b/vcl/inc/unx/salgdi.h
@@ -51,7 +51,6 @@ class SalDisplay;
 class SalFrame;
 class X11SalFrame;
 class X11SalVirtualDevice;
-class X11SalGraphicsImpl;
 class X11SkiaSalVirtualDevice;
 namespace vcl::font
 {
@@ -85,7 +84,6 @@ public:
 
 class X11SalGraphics final : public SalGraphicsAutoDelegateToImpl
 {
-    friend class X11SalGraphicsImpl;
     friend class X11CairoTextRender;
 
 public:
diff --git a/vcl/unx/generic/gdi/X11CairoSalGraphicsImpl.hxx 
b/vcl/unx/generic/gdi/X11CairoSalGraphicsImpl.hxx
index 2599f0157a03..d9944cc9714a 100644
--- a/vcl/unx/generic/gdi/X11CairoSalGraphicsImpl.hxx
+++ b/vcl/unx/generic/gdi/X11CairoSalGraphicsImpl.hxx
@@ -19,7 +19,7 @@
 
 #include <cairo-xlib.h>
 #include <unx/salgdi.h>
-#include "gdiimpl.hxx"
+#include <unx/x11/x11gdiimpl.h>
 #include "cairo_xlib_cairo.hxx"
 
 #include <headless/CairoCommon.hxx>
diff --git a/vcl/unx/generic/gdi/gdiimpl.cxx b/vcl/unx/generic/gdi/gdiimpl.cxx
deleted file mode 100644
index 857c0a283fff..000000000000
--- a/vcl/unx/generic/gdi/gdiimpl.cxx
+++ /dev/null
@@ -1,62 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include <memory>
-#include <numeric>
-
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-#include <X11/extensions/Xrender.h>
-#include <X11/Xproto.h>
-
-#include "gdiimpl.hxx"
-
-#include <vcl/gradient.hxx>
-#include <sal/log.hxx>
-
-#include <unx/saldisp.hxx>
-#include <unx/salgdi.h>
-#include <unx/salvd.h>
-#include <unx/x11/xlimits.hxx>
-#include <salframe.hxx>
-
-#include <basegfx/polygon/b2dpolygon.hxx>
-#include <basegfx/polygon/b2dpolypolygon.hxx>
-#include <basegfx/polygon/b2dpolypolygontools.hxx>
-#include <basegfx/polygon/b2dpolygontools.hxx>
-#include <basegfx/polygon/b2dpolygonclipper.hxx>
-#include <basegfx/polygon/b2dlinegeometry.hxx>
-#include <basegfx/matrix/b2dhommatrix.hxx>
-#include <basegfx/matrix/b2dhommatrixtools.hxx>
-#include <basegfx/polygon/b2dtrapezoid.hxx>
-#include <basegfx/utils/systemdependentdata.hxx>
-
-/* From <X11/Intrinsic.h> */
-typedef unsigned long Pixel;
-
-X11SalGraphicsImpl::X11SalGraphicsImpl(X11SalGraphics& rParent):
-    mrParent(rParent)
-{
-}
-
-X11SalGraphicsImpl::~X11SalGraphicsImpl()
-{
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/generic/gdi/gdiimpl.hxx b/vcl/unx/generic/gdi/gdiimpl.hxx
deleted file mode 100644
index a33bc0c84210..000000000000
--- a/vcl/unx/generic/gdi/gdiimpl.hxx
+++ /dev/null
@@ -1,54 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#pragma once
-
-#include <X11/Xlib.h>
-
-#include <unx/x11/x11gdiimpl.h>
-
-#include <salgdiimpl.hxx>
-
-#include <basegfx/polygon/b2dtrapezoid.hxx>
-#include <basegfx/polygon/b2dpolygontriangulator.hxx>
-#include <ControlCacheKey.hxx>
-#include <optional>
-
-/* From <X11/Intrinsic.h> */
-typedef unsigned long Pixel;
-
-class SalGraphics;
-class SalBitmap;
-class SalPolyLine;
-class X11SalGraphics;
-class Gradient;
-
-class X11SalGraphicsImpl : public SalGraphicsImpl, public X11GraphicsImpl
-{
-protected:
-    X11SalGraphics& mrParent;
-
-public:
-
-    explicit X11SalGraphicsImpl(X11SalGraphics& rParent);
-
-    virtual ~X11SalGraphicsImpl() override;
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/generic/gdi/salgdi.cxx b/vcl/unx/generic/gdi/salgdi.cxx
index f2dada01c3a0..3a1f9bca5412 100644
--- a/vcl/unx/generic/gdi/salgdi.cxx
+++ b/vcl/unx/generic/gdi/salgdi.cxx
@@ -50,7 +50,6 @@
 #include <salgdiimpl.hxx>
 #include <textrender.hxx>
 #include <salvd.hxx>
-#include "gdiimpl.hxx"
 
 #include <unx/salframe.h>
 #include <unx/cairotextrender.hxx>

Reply via email to