summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2017-06-01 21:31:19 +0300
committerBruno de Oliveira Abinader <bruno@mapbox.com>2017-06-13 13:37:41 +0300
commit28eb2e635417c7fb8d746a9ed1d76774066098b3 (patch)
treeb4968e1f7ee53bdc37577a530d9487a05db1d72d /platform
parent672ba516f225b231077baa0e3f6ae0749ee9c295 (diff)
downloadqtlocation-mapboxgl-28eb2e635417c7fb8d746a9ed1d76774066098b3.tar.gz
[core] Added Backend::{assume,set}Viewport
Diffstat (limited to 'platform')
-rwxr-xr-xplatform/android/src/native_map_view.cpp6
-rw-r--r--platform/glfw/glfw_view.cpp4
-rw-r--r--platform/ios/src/MGLMapView.mm4
-rw-r--r--platform/macos/src/MGLMapView.mm4
-rw-r--r--platform/qt/src/qmapboxgl.cpp4
5 files changed, 11 insertions, 11 deletions
diff --git a/platform/android/src/native_map_view.cpp b/platform/android/src/native_map_view.cpp
index 73a4f96549..7696be5b18 100755
--- a/platform/android/src/native_map_view.cpp
+++ b/platform/android/src/native_map_view.cpp
@@ -109,7 +109,7 @@ NativeMapView::~NativeMapView() {
*/
void NativeMapView::bind() {
setFramebufferBinding(0);
- setViewportSize(getFramebufferSize());
+ setViewport(0, 0, getFramebufferSize());
}
/**
@@ -292,7 +292,7 @@ void NativeMapView::render(jni::JNIEnv& env) {
BackendScope guard(*this);
if (framebufferSizeChanged) {
- setViewportSize(getFramebufferSize());
+ setViewport(0, 0, getFramebufferSize());
framebufferSizeChanged = false;
}
@@ -1430,7 +1430,7 @@ mbgl::Size NativeMapView::getFramebufferSize() const {
void NativeMapView::updateAssumedState() {
assumeFramebufferBinding(0);
- assumeViewportSize(getFramebufferSize());
+ assumeViewport(0, 0, getFramebufferSize());
}
void NativeMapView::updateFps() {
diff --git a/platform/glfw/glfw_view.cpp b/platform/glfw/glfw_view.cpp
index c5d36a5555..4f878550b3 100644
--- a/platform/glfw/glfw_view.cpp
+++ b/platform/glfw/glfw_view.cpp
@@ -136,12 +136,12 @@ void GLFWView::setMap(mbgl::Map *map_) {
void GLFWView::updateAssumedState() {
assumeFramebufferBinding(0);
- assumeViewportSize(getFramebufferSize());
+ assumeViewport(0, 0, getFramebufferSize());
}
void GLFWView::bind() {
setFramebufferBinding(0);
- setViewportSize(getFramebufferSize());
+ setViewport(0, 0, getFramebufferSize());
}
void GLFWView::onKey(GLFWwindow *window, int key, int /*scancode*/, int action, int mods) {
diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm
index 9a9f71d5c3..8ae3049e3e 100644
--- a/platform/ios/src/MGLMapView.mm
+++ b/platform/ios/src/MGLMapView.mm
@@ -5439,7 +5439,7 @@ public:
/// context state with the anticipated values.
void updateAssumedState() override {
assumeFramebufferBinding(ImplicitFramebufferBinding);
- assumeViewportSize(nativeView.framebufferSize);
+ assumeViewport(0, 0, nativeView.framebufferSize);
}
void bind() override {
@@ -5452,7 +5452,7 @@ public:
updateAssumedState();
} else {
// Our framebuffer is still bound, but the viewport might have changed.
- setViewportSize(nativeView.framebufferSize);
+ setViewport(0, 0, nativeView.framebufferSize);
}
}
diff --git a/platform/macos/src/MGLMapView.mm b/platform/macos/src/MGLMapView.mm
index c7f6e59c80..a8a84522a5 100644
--- a/platform/macos/src/MGLMapView.mm
+++ b/platform/macos/src/MGLMapView.mm
@@ -2888,12 +2888,12 @@ public:
void updateAssumedState() override {
glGetIntegerv(GL_FRAMEBUFFER_BINDING, &fbo);
assumeFramebufferBinding(fbo);
- assumeViewportSize(nativeView.framebufferSize);
+ assumeViewport(0, 0, nativeView.framebufferSize);
}
void bind() override {
setFramebufferBinding(fbo);
- setViewportSize(nativeView.framebufferSize);
+ setViewport(0, 0, nativeView.framebufferSize);
}
mbgl::PremultipliedImage readStillImage() {
diff --git a/platform/qt/src/qmapboxgl.cpp b/platform/qt/src/qmapboxgl.cpp
index 01471bf733..7bc02c9d1c 100644
--- a/platform/qt/src/qmapboxgl.cpp
+++ b/platform/qt/src/qmapboxgl.cpp
@@ -1506,12 +1506,12 @@ mbgl::Size QMapboxGLPrivate::framebufferSize() const {
void QMapboxGLPrivate::updateAssumedState() {
assumeFramebufferBinding(fbObject);
- assumeViewportSize(framebufferSize());
+ assumeViewport(0, 0, framebufferSize());
}
void QMapboxGLPrivate::bind() {
setFramebufferBinding(fbObject);
- setViewportSize(framebufferSize());
+ setViewport(0, 0, framebufferSize());
}
void QMapboxGLPrivate::invalidate()