summaryrefslogtreecommitdiff
path: root/platform/android/src/native_map_view.cpp
diff options
context:
space:
mode:
authorLauren Budorick <lauren@mapbox.com>2017-09-21 14:26:48 -0700
committerGitHub <noreply@github.com>2017-09-21 14:26:48 -0700
commita9ddf5b7fd311ffb9215a682ab2387181189071e (patch)
tree50e31aa30c8f58e6a82e6ff6dc2f5896ea963889 /platform/android/src/native_map_view.cpp
parentb91d9676a60204f2c9ee8803dec243d49f97e599 (diff)
downloadqtlocation-mapboxgl-a9ddf5b7fd311ffb9215a682ab2387181189071e.tar.gz
Preserve depth buffer between 3D layers + optimize render order (#9931)
Port of https://github.com/mapbox/mapbox-gl-js/pull/5101: adds a new render pass `Pass3D` before any other rendering wherein we render layers with 3D passes (fill-extrusion layers) to offscreen framebuffers, sharing a depth renderbuffer between those layers in order to render 3D space correctly. Those framebuffers are saved on the RenderLayers and copied back to the map during the translucent pass. Rendering to offscreen framebuffers before we do any clear + draw means we can avoid expensive framebuffer restores.
Diffstat (limited to 'platform/android/src/native_map_view.cpp')
-rwxr-xr-xplatform/android/src/native_map_view.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/platform/android/src/native_map_view.cpp b/platform/android/src/native_map_view.cpp
index d859d929d3..fb00cec1e2 100755
--- a/platform/android/src/native_map_view.cpp
+++ b/platform/android/src/native_map_view.cpp
@@ -115,6 +115,10 @@ void NativeMapView::bind() {
setViewport(0, 0, getFramebufferSize());
}
+mbgl::Size NativeMapView::getFramebufferSize() const {
+ return { static_cast<uint32_t>(fbWidth), static_cast<uint32_t>(fbHeight) };
+}
+
/**
* From mbgl::RendererBackend.
*/
@@ -1428,10 +1432,6 @@ void NativeMapView::_destroySurface() {
}
}
-mbgl::Size NativeMapView::getFramebufferSize() const {
- return { static_cast<uint32_t>(fbWidth), static_cast<uint32_t>(fbHeight) };
-}
-
void NativeMapView::updateAssumedState() {
assumeFramebufferBinding(0);
assumeViewport(0, 0, getFramebufferSize());