summaryrefslogtreecommitdiff
path: root/vcl/unx/generic/gdi/cairo_xlib_cairo.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/unx/generic/gdi/cairo_xlib_cairo.cxx')
-rw-r--r--vcl/unx/generic/gdi/cairo_xlib_cairo.cxx9
1 files changed, 3 insertions, 6 deletions
diff --git a/vcl/unx/generic/gdi/cairo_xlib_cairo.cxx b/vcl/unx/generic/gdi/cairo_xlib_cairo.cxx
index a45faa4f8061..11d4e6cc19a1 100644
--- a/vcl/unx/generic/gdi/cairo_xlib_cairo.cxx
+++ b/vcl/unx/generic/gdi/cairo_xlib_cairo.cxx
@@ -301,9 +301,8 @@ namespace cairo
**/
int X11Surface::getDepth() const
{
- if( maSysData.pRenderFormat )
+ if (maSysData.pRenderFormat)
return static_cast<XRenderPictFormat*>(maSysData.pRenderFormat)->depth;
-
return -1;
}
@@ -315,15 +314,13 @@ namespace cairo
DeviceFormat X11Surface::getFormat() const
{
if (!maSysData.pRenderFormat)
- return DeviceFormat::FULLCOLOR;
+ return DeviceFormat::DEFAULT;
switch (static_cast<XRenderPictFormat*>(maSysData.pRenderFormat)->depth)
{
case 1:
return DeviceFormat::BITMASK;
- case 8:
- return DeviceFormat::GRAYSCALE;
default:
- return DeviceFormat::FULLCOLOR;
+ return DeviceFormat::DEFAULT;
}
}
}