summaryrefslogtreecommitdiff
path: root/src/mbgl
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 /src/mbgl
parent672ba516f225b231077baa0e3f6ae0749ee9c295 (diff)
downloadqtlocation-mapboxgl-28eb2e635417c7fb8d746a9ed1d76774066098b3.tar.gz
[core] Added Backend::{assume,set}Viewport
Diffstat (limited to 'src/mbgl')
-rw-r--r--src/mbgl/map/backend.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mbgl/map/backend.cpp b/src/mbgl/map/backend.cpp
index 0b4fd01050..4c84453c1f 100644
--- a/src/mbgl/map/backend.cpp
+++ b/src/mbgl/map/backend.cpp
@@ -32,8 +32,9 @@ void Backend::assumeFramebufferBinding(const gl::FramebufferID fbo) {
assert(gl::value::BindFramebuffer::Get() == getContext().bindFramebuffer.getCurrentValue());
}
}
-void Backend::assumeViewportSize(const Size& size) {
- getContext().viewport.setCurrentValue({ 0, 0, size });
+
+void Backend::assumeViewport(int32_t x, int32_t y, const Size& size) {
+ getContext().viewport.setCurrentValue({ x, y, size });
assert(gl::value::Viewport::Get() == getContext().viewport.getCurrentValue());
}
@@ -48,8 +49,8 @@ void Backend::setFramebufferBinding(const gl::FramebufferID fbo) {
}
}
-void Backend::setViewportSize(const Size& size) {
- getContext().viewport = { 0, 0, size };
+void Backend::setViewport(int32_t x, int32_t y, const Size& size) {
+ getContext().viewport = { x, y, size };
assert(gl::value::Viewport::Get() == getContext().viewport.getCurrentValue());
}