canvas/source/cairo/cairo_canvasbitmap.hxx          |    3 --
 slideshow/source/engine/opengl/TransitionerImpl.cxx |    2 -
 vcl/unx/generic/gdi/cairo_xlib_cairo.cxx            |   25 +++-----------------
 vcl/unx/generic/gdi/cairo_xlib_cairo.hxx            |    2 -
 vcl/unx/generic/gdi/salgdi.cxx                      |    3 --
 vcl/unx/generic/window/salobj.cxx                   |    4 +--
 6 files changed, 9 insertions(+), 30 deletions(-)

New commits:
commit 1520708cd976ffd39a60bb9d167b6d3c0dbb9c57
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Sun Jan 15 21:20:37 2023 +0000
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Mon Jan 16 11:32:13 2023 +0000

    The third "depth argument is unused
    
    as far as I can determine. We do query the 2nd arg in "gen"
    when there is an opengl slide transition.
    
    Change-Id: I180c91fa193ee6e7e3d5a415e4278aded9fbbba1
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145544
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/canvas/source/cairo/cairo_canvasbitmap.hxx 
b/canvas/source/cairo/cairo_canvasbitmap.hxx
index 8826bc82ebe2..f2371821023f 100644
--- a/canvas/source/cairo/cairo_canvasbitmap.hxx
+++ b/canvas/source/cairo/cairo_canvasbitmap.hxx
@@ -106,10 +106,9 @@ namespace cairocanvas
         // 0 ... get pointer to BitmapEx
         // 1 ... get X pixmap handle to rgb content
         // 2 ... FIXME: leftover? ever called with this? always returns 
nothing (empty Any)
-        // returned any contains either BitmapEx pointer or array of three Any 
value
+        // returned any contains either BitmapEx pointer or array of two Any 
value
         //     1st a bool value: true - free the pixmap after used by 
XFreePixmap, false do nothing, the pixmap is used internally in the canvas
         //     2nd the pixmap handle (sal_Int64)
-        //     3rd the pixmap depth
         virtual css::uno::Any SAL_CALL getFastPropertyValue(sal_Int32 nHandle) 
override;
         virtual void SAL_CALL setFastPropertyValue(sal_Int32, const 
css::uno::Any&) override {}
 
diff --git a/slideshow/source/engine/opengl/TransitionerImpl.cxx 
b/slideshow/source/engine/opengl/TransitionerImpl.cxx
index 99a9ea79a6ec..4aab29426013 100644
--- a/slideshow/source/engine/opengl/TransitionerImpl.cxx
+++ b/slideshow/source/engine/opengl/TransitionerImpl.cxx
@@ -385,7 +385,7 @@ void OGLTransitionerImpl::setSlides( const uno::Reference< 
rendering::XBitmap >&
         xEnteringFastPropertySet->getFastPropertyValue(1) >>= aEnteringBitmap;
         xLeavingFastPropertySet->getFastPropertyValue(1) >>= aLeavingBitmap;
     }
-    if (aEnteringBitmap.getLength() == 3 && aLeavingBitmap.getLength() == 3)
+    if (aEnteringBitmap.getLength() == 2 && aLeavingBitmap.getLength() == 2)
         pChildWindow->SetLeaveEnterBackgrounds(aLeavingBitmap, 
aEnteringBitmap);
 }
 
diff --git a/vcl/unx/generic/gdi/cairo_xlib_cairo.cxx 
b/vcl/unx/generic/gdi/cairo_xlib_cairo.cxx
index 4ec335d10324..ede009f7f914 100644
--- a/vcl/unx/generic/gdi/cairo_xlib_cairo.cxx
+++ b/vcl/unx/generic/gdi/cairo_xlib_cairo.cxx
@@ -57,24 +57,21 @@ namespace cairo
         pDisplay(nullptr),
         hDrawable(0),
         pVisual(nullptr),
-        nScreen(0),
-        pRenderFormat(nullptr)
+        nScreen(0)
     {}
 
     X11SysData::X11SysData( const SystemGraphicsData& pSysDat ) :
         pDisplay(pSysDat.pDisplay),
         hDrawable(pSysDat.hDrawable),
         pVisual(pSysDat.pVisual),
-        nScreen(pSysDat.nScreen),
-        pRenderFormat(nullptr)
+        nScreen(pSysDat.nScreen)
     {}
 
     X11SysData::X11SysData( const SystemEnvData& pSysDat, const SalFrame* 
pReference ) :
         pDisplay(pSysDat.pDisplay),
         hDrawable(pSysDat.GetWindowHandle(pReference)),
         pVisual(pSysDat.pVisual),
-        nScreen(pSysDat.nScreen),
-        pRenderFormat(nullptr)
+        nScreen(pSysDat.nScreen)
     {}
 
     X11Pixmap::~X11Pixmap()
@@ -217,10 +214,8 @@ namespace cairo
                                      width > 0 ? width : 1, height > 0 ? 
height : 1,
                                      pFormat->depth );
 
-            X11SysData aSysData(maSysData);
-            aSysData.pRenderFormat = pFormat;
             return SurfaceSharedPtr(
-                new X11Surface( aSysData,
+                new X11Surface( maSysData,
                                 std::make_shared<X11Pixmap>(hPixmap, 
maSysData.pDisplay),
                                 CairoSurfaceSharedPtr(
                                     
cairo_xlib_surface_create_with_xrender_format(
@@ -277,18 +272,6 @@ namespace cairo
     {
         XSync( static_cast<Display*>(maSysData.pDisplay), false );
     }
-
-    /**
-     * Surface::getDepth:  Get the color depth of the Canvas surface.
-     *
-     * @return color depth
-     **/
-    int X11Surface::getDepth() const
-    {
-        if (maSysData.pRenderFormat)
-            return 
static_cast<XRenderPictFormat*>(maSysData.pRenderFormat)->depth;
-        return -1;
-    }
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/generic/gdi/cairo_xlib_cairo.hxx 
b/vcl/unx/generic/gdi/cairo_xlib_cairo.hxx
index 4f0b33101d4a..229a0f7671dd 100644
--- a/vcl/unx/generic/gdi/cairo_xlib_cairo.hxx
+++ b/vcl/unx/generic/gdi/cairo_xlib_cairo.hxx
@@ -41,7 +41,6 @@ namespace cairo {
         Drawable hDrawable;     // a drawable
         void*   pVisual;        // the visual in use
         int nScreen;        // the current screen of the drawable
-        void*   pRenderFormat;  // render format for drawable
     };
 
     /// RAII wrapper for a pixmap
@@ -87,7 +86,6 @@ namespace cairo {
 
         virtual void flush() const override;
 
-        int getDepth() const;
         const X11PixmapSharedPtr& getPixmap() const { return mpPixmap; }
     };
 }
diff --git a/vcl/unx/generic/gdi/salgdi.cxx b/vcl/unx/generic/gdi/salgdi.cxx
index bd8a8eb73c3a..366c0c9a227f 100644
--- a/vcl/unx/generic/gdi/salgdi.cxx
+++ b/vcl/unx/generic/gdi/salgdi.cxx
@@ -285,8 +285,7 @@ css::uno::Any 
X11SalGraphics::GetNativeSurfaceHandle(cairo::SurfaceSharedPtr& rS
     cairo::X11Surface& 
rXlibSurface=dynamic_cast<cairo::X11Surface&>(*rSurface);
     css::uno::Sequence< css::uno::Any > args{
         css::uno::Any(false), // do not call XFreePixmap on it
-        css::uno::Any(sal_Int64(rXlibSurface.getPixmap()->mhDrawable)),
-        css::uno::Any(sal_Int32( rXlibSurface.getDepth() ))
+        css::uno::Any(sal_Int64(rXlibSurface.getPixmap()->mhDrawable))
     };
     return css::uno::Any(args);
 }
diff --git a/vcl/unx/generic/window/salobj.cxx 
b/vcl/unx/generic/window/salobj.cxx
index c24e138e5d6f..e2571c7911a2 100644
--- a/vcl/unx/generic/window/salobj.cxx
+++ b/vcl/unx/generic/window/salobj.cxx
@@ -476,7 +476,7 @@ void X11SalObject::SetLeaveEnterBackgrounds(const 
css::uno::Sequence<css::uno::A
 
     bool bFreePixmap = false;
     Pixmap aPixmap = None;
-    if (rEnterArgs.getLength() == 3)
+    if (rEnterArgs.getLength() == 2)
     {
         rEnterArgs[0] >>= bFreePixmap;
         sal_Int64 pixmapHandle = None;
@@ -490,7 +490,7 @@ void X11SalObject::SetLeaveEnterBackgrounds(const 
css::uno::Sequence<css::uno::A
 
     bFreePixmap = false;
     aPixmap = None;
-    if (rLeaveArgs.getLength() == 3)
+    if (rLeaveArgs.getLength() == 2)
     {
         rLeaveArgs[0] >>= bFreePixmap;
         sal_Int64 pixmapHandle = None;

Reply via email to