diff options
-rw-r--r-- | vcl/headless/CairoCommon.cxx | 7 | ||||
-rw-r--r-- | vcl/headless/SvpGraphicsBackend.cxx | 7 | ||||
-rw-r--r-- | vcl/inc/headless/CairoCommon.hxx | 2 |
3 files changed, 10 insertions, 6 deletions
diff --git a/vcl/headless/CairoCommon.cxx b/vcl/headless/CairoCommon.cxx index fe5f60021aa6..12f42313081b 100644 --- a/vcl/headless/CairoCommon.cxx +++ b/vcl/headless/CairoCommon.cxx @@ -400,6 +400,13 @@ cairo_user_data_key_t* CairoCommon::getDamageKey() return &aDamageKey; } +sal_uInt16 CairoCommon::GetBitCount() const +{ + if (cairo_surface_get_content(m_pSurface) != CAIRO_CONTENT_COLOR_ALPHA) + return 1; + return 32; +} + cairo_t* CairoCommon::getCairoContext(bool bXorModeAllowed, bool bAntiAlias) const { cairo_t* cr; diff --git a/vcl/headless/SvpGraphicsBackend.cxx b/vcl/headless/SvpGraphicsBackend.cxx index 9a4ef1fc734d..f6674925815e 100644 --- a/vcl/headless/SvpGraphicsBackend.cxx +++ b/vcl/headless/SvpGraphicsBackend.cxx @@ -41,12 +41,7 @@ void SvpGraphicsBackend::setClipRegion(const vcl::Region& i_rClip) void SvpGraphicsBackend::ResetClipRegion() { m_rCairoCommon.m_aClipRegion.SetNull(); } -sal_uInt16 SvpGraphicsBackend::GetBitCount() const -{ - if (cairo_surface_get_content(m_rCairoCommon.m_pSurface) != CAIRO_CONTENT_COLOR_ALPHA) - return 1; - return 32; -} +sal_uInt16 SvpGraphicsBackend::GetBitCount() const { return m_rCairoCommon.GetBitCount(); } tools::Long SvpGraphicsBackend::GetGraphicsWidth() const { diff --git a/vcl/inc/headless/CairoCommon.hxx b/vcl/inc/headless/CairoCommon.hxx index ea041a91187c..733118fbd0c0 100644 --- a/vcl/inc/headless/CairoCommon.hxx +++ b/vcl/inc/headless/CairoCommon.hxx @@ -143,6 +143,8 @@ struct VCL_DLLPUBLIC CairoCommon cairo_surface_t* getSurface() const { return m_pSurface; } + sal_uInt16 GetBitCount() const; + cairo_t* getCairoContext(bool bXorModeAllowed, bool bAntiAlias) const; void releaseCairoContext(cairo_t* cr, bool bXorModeAllowed, const basegfx::B2DRange& rExtents) const; |