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 <caolanm@redhat.com>
This commit is contained in:
Caolán McNamara
2023-01-16 11:32:13 +00:00
parent 0dbc1bd6b7
commit 1520708cd9
6 changed files with 9 additions and 30 deletions
+1 -2
View File
@@ -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 {}
@@ -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);
}
+4 -21
View File
@@ -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: */
-2
View File
@@ -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; }
};
}
+1 -2
View File
@@ -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);
}
+2 -2
View File
@@ -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;