From 1520708cd976ffd39a60bb9d167b6d3c0dbb9c57 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sun, 15 Jan 2023 21:20:37 +0000 Subject: The third "depth argument is unused MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- 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 ++-- 4 files changed, 7 insertions(+), 27 deletions(-) (limited to 'vcl/unx') 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(hPixmap, maSysData.pDisplay), CairoSurfaceSharedPtr( cairo_xlib_surface_create_with_xrender_format( @@ -277,18 +272,6 @@ namespace cairo { XSync( static_cast(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(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(*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>= bFreePixmap; sal_Int64 pixmapHandle = None; @@ -490,7 +490,7 @@ void X11SalObject::SetLeaveEnterBackgrounds(const css::uno::Sequence>= bFreePixmap; sal_Int64 pixmapHandle = None; -- cgit