diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-11-22 15:35:16 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-11-24 11:55:23 +0000 |
commit | 1df0bc489ae9bdfdac48bf6cb945edc3b54ab5b2 (patch) | |
tree | 1f808b3b00cd09b9f55fa3f68c464a709b6acbbd /vcl/inc | |
parent | af251ffb32e079efaadb3c787a41040fcd983fe0 (diff) |
Resolves: tdf#99508 ensure sufficient size for hidpi backing surface
and match virtual device scale with widget device scale
Change-Id: I1f35dcbaec94be12758ad6e4276bfd6bda4b1e88
Reviewed-on: https://gerrit.libreoffice.org/31080
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Jenkins <ci@libreoffice.org>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
(cherry picked from commit d9a6e0023c9a192850b9db00f8120fbcc4256ec9)
Reviewed-on: https://gerrit.libreoffice.org/31154
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/inc')
-rw-r--r-- | vcl/inc/headless/svpgdi.hxx | 2 | ||||
-rw-r--r-- | vcl/inc/headless/svpvd.hxx | 4 | ||||
-rw-r--r-- | vcl/inc/unx/gtk/gtkdata.hxx | 2 |
3 files changed, 7 insertions, 1 deletions
diff --git a/vcl/inc/headless/svpgdi.hxx b/vcl/inc/headless/svpgdi.hxx index 1ef0f3283474..97fd67809100 100644 --- a/vcl/inc/headless/svpgdi.hxx +++ b/vcl/inc/headless/svpgdi.hxx @@ -80,6 +80,7 @@ struct VCL_DLLPUBLIC DamageHandler class VCL_DLLPUBLIC SvpSalGraphics : public SalGraphics { cairo_surface_t* m_pSurface; + double m_fScale; SalColor m_aLineColor; SalColor m_aFillColor; PaintMode m_ePaintMode; @@ -236,6 +237,7 @@ public: cairo_t* getCairoContext(bool bXorModeAllowed) const; void releaseCairoContext(cairo_t* cr, bool bXorModeAllowed, const basegfx::B2DRange& rExtents) const; static cairo_surface_t* createCairoSurface(const BitmapBuffer *pBuffer); + double getScale() const { return m_fScale; } void clipRegion(cairo_t* cr); }; diff --git a/vcl/inc/headless/svpvd.hxx b/vcl/inc/headless/svpvd.hxx index c624f74620b5..882f36d6fc37 100644 --- a/vcl/inc/headless/svpvd.hxx +++ b/vcl/inc/headless/svpvd.hxx @@ -31,12 +31,14 @@ class VCL_DLLPUBLIC SvpSalVirtualDevice : public SalVirtualDevice { DeviceFormat m_eFormat; cairo_surface_t* m_pSurface; + double m_fScale; std::list< SvpSalGraphics* > m_aGraphics; public: - SvpSalVirtualDevice(DeviceFormat eFormat) + SvpSalVirtualDevice(DeviceFormat eFormat, double fScale) : m_eFormat(eFormat) , m_pSurface(nullptr) + , m_fScale(fScale) { } virtual ~SvpSalVirtualDevice() override; diff --git a/vcl/inc/unx/gtk/gtkdata.hxx b/vcl/inc/unx/gtk/gtkdata.hxx index ffb0fb700718..c59d7a2408a6 100644 --- a/vcl/inc/unx/gtk/gtkdata.hxx +++ b/vcl/inc/unx/gtk/gtkdata.hxx @@ -137,6 +137,7 @@ class GtkSalDisplay : public SalDisplay o3tl::enumarray<PointerStyle, GdkCursor*> m_aCursors; bool m_bStartupCompleted; bool m_bX11Display; + bool m_bOwnHiDpiScale; GdkCursor* getFromXBM( const unsigned char *pBitmap, const unsigned char *pMask, int nWidth, int nHeight, int nXHot, int nYHot ); @@ -146,6 +147,7 @@ public: GdkDisplay* GetGdkDisplay() const { return m_pGdkDisplay; } bool IsX11Display() const { return m_bX11Display; } + bool IsOwnHiDpiScale() const { return m_bOwnHiDpiScale; } GtkSalSystem* getSystem() const { return m_pSys; } |