diff options
Diffstat (limited to 'platform/qt/src/qmapboxgl.cpp')
-rw-r--r-- | platform/qt/src/qmapboxgl.cpp | 37 |
1 files changed, 17 insertions, 20 deletions
diff --git a/platform/qt/src/qmapboxgl.cpp b/platform/qt/src/qmapboxgl.cpp index 89904ddf88..df5673e35b 100644 --- a/platform/qt/src/qmapboxgl.cpp +++ b/platform/qt/src/qmapboxgl.cpp @@ -1047,37 +1047,20 @@ void QMapboxGL::rotateBy(const QPointF &first, const QPointF &second) } /*! - Resize the map to \a size and scale to fit at \a framebufferSize. For - high DPI screens, the size will be smaller than the \a framebufferSize. - - This fallowing example will double the pixel density of the map for - a given \c size: - - \code - map->resize(size / 2, size); - \endcode + Resize the map to \a size_ and scale to fit at the framebuffer. For + high DPI screens, the size will be smaller than the framebuffer. */ -void QMapboxGL::resize(const QSize& size_, const QSize& framebufferSize) +void QMapboxGL::resize(const QSize& size_) { auto size = sanitizedSize(size_); if (d_ptr->mapObj->getSize() == size) return; - d_ptr->mapRenderer->updateFramebufferSize(sanitizedSize(framebufferSize)); d_ptr->mapObj->setSize(size); } /*! - If Mapbox GL needs to rebind the default \a fbo, it will use the - ID supplied here. -*/ -void QMapboxGL::setFramebufferObject(quint32) -{ - // FIXME: No-op, implicit. -} - -/*! Adds an \a icon to the annotation icon pool. This can be later used by the annotation functions to shown any drawing on the map by referencing its \a name. @@ -1513,6 +1496,20 @@ void QMapboxGL::render() } /*! + If Mapbox GL needs to rebind the default \a fbo, it will use the + ID supplied here. \a size is the size of the framebuffer, which + on high DPI screens is usually bigger than the map size. +*/ +void QMapboxGL::setFramebufferObject(quint32 fbo, const QSize& size) +{ + if (!d_ptr->mapRenderer) { + createRenderer(); + } + + d_ptr->mapRenderer->updateFramebuffer(fbo, sanitizedSize(size)); +} + +/*! Informs the map that the network connection has been established, causing all network requests that previously timed out to be retried immediately. */ |