diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2016-10-10 17:16:37 +0200 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2016-10-25 13:52:36 -0700 |
commit | a4d259c33f9bb890bba97fd89552720e3e0ec09b (patch) | |
tree | 342ecc27a6993c48f3a2e1d739fce890350bc44d /platform/qt/src/qmapboxgl_p.hpp | |
parent | 5cc390d694fc7510d445310d8eb9e32429a5e67b (diff) | |
download | qtlocation-mapboxgl-a4d259c33f9bb890bba97fd89552720e3e0ec09b.tar.gz |
[core] move gl::Context to Backend and refactor View
Diffstat (limited to 'platform/qt/src/qmapboxgl_p.hpp')
-rw-r--r-- | platform/qt/src/qmapboxgl_p.hpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/platform/qt/src/qmapboxgl_p.hpp b/platform/qt/src/qmapboxgl_p.hpp index 5a228896dc..e7a14601c1 100644 --- a/platform/qt/src/qmapboxgl_p.hpp +++ b/platform/qt/src/qmapboxgl_p.hpp @@ -17,22 +17,27 @@ class QMapboxGLPrivate : public QObject, public mbgl::View, public mbgl::Backend Q_OBJECT public: - explicit QMapboxGLPrivate(QMapboxGL *, const QMapboxGLSettings &); + explicit QMapboxGLPrivate(QMapboxGL *, const QMapboxGLSettings &, const QSize &size, qreal pixelRatio); virtual ~QMapboxGLPrivate(); // mbgl::View implementation. float getPixelRatio() const; void bind() final; - std::array<uint16_t, 2> getSize() const final; - std::array<uint16_t, 2> getFramebufferSize() const final; + std::array<uint16_t, 2> getSize() const; + std::array<uint16_t, 2> getFramebufferSize() const; void activate() final {} void deactivate() final {} void invalidate() final; void notifyMapChange(mbgl::MapChange) final; +#if QT_VERSION >= 0x050000 + void updateFramebufferBinding(QOpenGLFramebufferObject *); +#endif + mbgl::EdgeInsets margins; QSize size { 0, 0 }; + QSize fbSize { 0, 0 }; QMapboxGL *q_ptr { nullptr }; @@ -42,6 +47,8 @@ public: bool dirty { false }; + QOpenGLFramebufferObject *fbo { nullptr }; + public slots: void connectionEstablished(); |