summaryrefslogtreecommitdiff
path: root/platform/qt
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2017-03-22 14:20:35 +0100
committerKonstantin Käfer <mail@kkaefer.com>2017-03-28 13:53:19 +0200
commita84aa453a9124867cb285f012abd97077ab2a019 (patch)
tree6181d5a39960df96e6dcd2d5c9d905c537b964fe /platform/qt
parent3f0f4575e77ef289ca209323c0000cf743ab9db2 (diff)
downloadqtlocation-mapboxgl-a84aa453a9124867cb285f012abd97077ab2a019.tar.gz
[core] Privatize OpenGL/Context headers
Diffstat (limited to 'platform/qt')
-rw-r--r--platform/qt/src/qmapboxgl.cpp14
-rw-r--r--platform/qt/src/qmapboxgl_p.hpp2
2 files changed, 6 insertions, 10 deletions
diff --git a/platform/qt/src/qmapboxgl.cpp b/platform/qt/src/qmapboxgl.cpp
index 5776502a5b..1499def75d 100644
--- a/platform/qt/src/qmapboxgl.cpp
+++ b/platform/qt/src/qmapboxgl.cpp
@@ -7,7 +7,6 @@
#include <mbgl/annotation/annotation.hpp>
#include <mbgl/map/camera.hpp>
#include <mbgl/map/map.hpp>
-#include <mbgl/gl/context.hpp>
#include <mbgl/map/backend_scope.hpp>
#include <mbgl/style/conversion.hpp>
#include <mbgl/style/conversion/layer.hpp>
@@ -1500,7 +1499,6 @@ void QMapboxGL::render()
mbgl::BackendScope scope { *d_ptr, mbgl::BackendScope::ScopeType::Implicit };
d_ptr->dirty = false;
- d_ptr->updateViewBinding();
d_ptr->mapObj->render(*d_ptr);
}
@@ -1575,16 +1573,14 @@ mbgl::Size QMapboxGLPrivate::framebufferSize() const {
return { static_cast<uint32_t>(fbSize.width()), static_cast<uint32_t>(fbSize.height()) };
}
-void QMapboxGLPrivate::updateViewBinding() {
- getContext().bindFramebuffer.setCurrentValue(fbObject);
- assert(mbgl::gl::value::BindFramebuffer::Get() == getContext().bindFramebuffer.getCurrentValue());
- getContext().viewport.setCurrentValue({ 0, 0, framebufferSize() });
- assert(mbgl::gl::value::Viewport::Get() == getContext().viewport.getCurrentValue());
+void QMapboxGLPrivate::updateAssumedState() {
+ assumeFramebufferBinding(fbObject);
+ assumeViewportSize(framebufferSize());
}
void QMapboxGLPrivate::bind() {
- getContext().bindFramebuffer = fbObject;
- getContext().viewport = { 0, 0, framebufferSize() };
+ setFramebufferBinding(fbObject);
+ setViewportSize(framebufferSize());
}
void QMapboxGLPrivate::invalidate()
diff --git a/platform/qt/src/qmapboxgl_p.hpp b/platform/qt/src/qmapboxgl_p.hpp
index 464b66bd73..49a7942cce 100644
--- a/platform/qt/src/qmapboxgl_p.hpp
+++ b/platform/qt/src/qmapboxgl_p.hpp
@@ -21,12 +21,12 @@ public:
virtual ~QMapboxGLPrivate();
mbgl::Size framebufferSize() const;
- void updateViewBinding();
// mbgl::View implementation.
void bind() final;
// mbgl::Backend implementation.
+ void updateAssumedState() final;
void invalidate() final;
void activate() final {}
void deactivate() final {}