diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2019-05-24 15:36:39 +0000 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2019-05-28 16:17:44 +0200 |
commit | 86cab846c1a122dd4dd5f5c4ca5750a0fc397c6b (patch) | |
tree | 1ef2b90a7b1a415496e242935fdbf7844a7f90e5 /vcl/inc/qt5/Qt5Frame.hxx | |
parent | ee2a9436dc9b4586e993062a2f85b105d8c16b25 (diff) |
Qt5 implement SalSurface support for cairo
Current qt5+cairo uses the plain VCL canvas. This patch is just a
copy of Gtk3Surface (minus comments) with a different update call.
This way the Cairo path now uses the Cairo canvas instead.
It fixes at least tdf#122668 for me, but other Impress bugs might
be fixed this way too.
Change-Id: Iba511c851001753328293c28e53eaa4acc4315d0
Reviewed-on: https://gerrit.libreoffice.org/72921
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
Reviewed-by: Aleksei Nikiforov <darktemplar@basealt.ru>
Diffstat (limited to 'vcl/inc/qt5/Qt5Frame.hxx')
-rw-r--r-- | vcl/inc/qt5/Qt5Frame.hxx | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/vcl/inc/qt5/Qt5Frame.hxx b/vcl/inc/qt5/Qt5Frame.hxx index 9b9c13b4b7fa..a42a95aac3bd 100644 --- a/vcl/inc/qt5/Qt5Frame.hxx +++ b/vcl/inc/qt5/Qt5Frame.hxx @@ -30,18 +30,19 @@ #include <QtCore/QObject> +class Qt5DragSource; +class Qt5DropTarget; class Qt5Graphics; class Qt5Instance; -class Qt5Menu; -class QWidget; class Qt5MainWindow; -class Qt5DragSource; -class Qt5DropTarget; +class Qt5Menu; +class Qt5SvpGraphics; + +class QImage; class QMimeData; class QPaintDevice; class QScreen; -class QImage; -class SvpSalGraphics; +class QWidget; class VCLPLUG_QT5_PUBLIC Qt5Frame : public QObject, public SalFrame { @@ -56,11 +57,11 @@ class VCLPLUG_QT5_PUBLIC Qt5Frame : public QObject, public SalFrame std::unique_ptr<QImage> m_pQImage; std::unique_ptr<Qt5Graphics> m_pQt5Graphics; UniqueCairoSurface m_pSurface; - std::unique_ptr<SvpSalGraphics> m_pOurSvpGraphics; + std::unique_ptr<Qt5SvpGraphics> m_pOurSvpGraphics; // in base class, this ptr is the same as m_pOurSvpGraphic // in derived class, it can point to a derivative - // of SvpSalGraphics (which the derived class then owns) - SvpSalGraphics* m_pSvpGraphics; + // of Qt5SvpGraphics (which the derived class then owns) + Qt5SvpGraphics* m_pSvpGraphics; DamageHandler m_aDamageHandler; QRegion m_aRegion; bool m_bNullRegion; @@ -124,7 +125,7 @@ public: void Damage(sal_Int32 nExtentsX, sal_Int32 nExtentsY, sal_Int32 nExtentsWidth, sal_Int32 nExtentsHeight) const; - virtual void InitSvpSalGraphics(SvpSalGraphics* pSvpSalGraphics); + void InitQt5SvpGraphics(Qt5SvpGraphics* pQt5SvpGraphics); virtual SalGraphics* AcquireGraphics() override; virtual void ReleaseGraphics(SalGraphics* pGraphics) override; @@ -190,6 +191,8 @@ public: virtual void SetApplicationID(const OUString&) override; inline bool CallCallback(SalEvent nEvent, const void* pEvent) const; + + cairo_t* getCairoContext() const; }; inline bool Qt5Frame::CallCallback(SalEvent nEvent, const void* pEvent) const |