diff options
author | Caolán McNamara <caolanm@redhat.com> | 2023-01-10 15:42:42 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2023-01-11 10:03:54 +0000 |
commit | ef5eed8e85490c2f45700bbc31bff3f729966ab2 (patch) | |
tree | ce627cbb86ac8c9df9c0b4962e2d0ba5c5444b4f /vcl/headless | |
parent | 6314c6b33dbe29fcba9d92157eaed42772d9c1fc (diff) |
move GetBitCount into CairoCommon
Change-Id: I1afc900ec10a9a8f5db29400666fcc78d7bc8f48
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145286
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/headless')
-rw-r--r-- | vcl/headless/CairoCommon.cxx | 7 | ||||
-rw-r--r-- | vcl/headless/SvpGraphicsBackend.cxx | 7 |
2 files changed, 8 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 { |