From 3ffc14a3250e5c4eb7dcaf0d1cc0e95c9de3c014 Mon Sep 17 00:00:00 2001 From: Aleksandar Stojiljkovic Date: Tue, 9 Jul 2019 14:07:41 +0300 Subject: [PATCH] Issue #15065 changelogs and nit fix. --- platform/android/CHANGELOG.md | 1 + platform/ios/CHANGELOG.md | 1 + platform/macos/CHANGELOG.md | 1 + src/mbgl/renderer/render_orchestrator.cpp | 11 ++++++----- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/platform/android/CHANGELOG.md b/platform/android/CHANGELOG.md index c699349bec0..d4545e36a70 100644 --- a/platform/android/CHANGELOG.md +++ b/platform/android/CHANGELOG.md @@ -5,6 +5,7 @@ Mapbox welcomes participation and contributions from everyone. If you'd like to ## master * Performance improvements for queryRenderedFeatures API and optimization that allocates containers based on a number of rendered layers. ([#14930](https://github.com/mapbox/mapbox-gl-native/pull/14930)) +- Fixed rendering layers after fill-extrusion regression caused by optimization of fill-extrusion rendering [#15065](https://github.com/mapbox/mapbox-gl-native/pull/15065) ## 8.2.0-alpha.2 - July 3, 2019 diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md index 201f92590c6..79e96bb84c3 100644 --- a/platform/ios/CHANGELOG.md +++ b/platform/ios/CHANGELOG.md @@ -5,6 +5,7 @@ Mapbox welcomes participation and contributions from everyone. Please read [CONT ## master * Performance improvements for queryRenderedFeatures API and optimization that allocates containers based on a number of rendered layers. ([#14930](https://github.com/mapbox/mapbox-gl-native/pull/14930)) +* Fixed rendering layers after fill-extrusion regression caused by optimization of fill-extrusion rendering. ([#15065](https://github.com/mapbox/mapbox-gl-native/pull/15065)) ## 5.2.0 diff --git a/platform/macos/CHANGELOG.md b/platform/macos/CHANGELOG.md index bf4ff551568..8ca94773016 100644 --- a/platform/macos/CHANGELOG.md +++ b/platform/macos/CHANGELOG.md @@ -5,6 +5,7 @@ * Added an `MGLMapView.prefetchesTiles` property to configure lower-resolution tile prefetching behavior. ([#14816](https://github.com/mapbox/mapbox-gl-native/pull/14816)) * Fixed queryRenderedFeatues bug caused by incorrect sort feature index calculation. ([#14884](https://github.com/mapbox/mapbox-gl-native/pull/14884)) * Performance improvements for queryRenderedFeatures API and optimization that allocates containers based on a number of rendered layers. ([#14930](https://github.com/mapbox/mapbox-gl-native/pull/14930)) +* Fixed rendering layers after fill-extrusion regression caused by optimization of fill-extrusion rendering. ([#15065](https://github.com/mapbox/mapbox-gl-native/pull/15065)) ### Styles and rendering diff --git a/src/mbgl/renderer/render_orchestrator.cpp b/src/mbgl/renderer/render_orchestrator.cpp index c70ce63c765..cf5a7d190ea 100644 --- a/src/mbgl/renderer/render_orchestrator.cpp +++ b/src/mbgl/renderer/render_orchestrator.cpp @@ -342,15 +342,16 @@ std::unique_ptr RenderOrchestrator::createRenderTree(const UpdatePar } } - uint32_t i = static_cast(layerRenderItems.size()) - 1; - for (auto it = layerRenderItems.begin(); it != layerRenderItems.end(); ++it, --i) { - RenderLayer& renderLayer = it->layer; - renderLayer.prepare({it->source, *imageManager, *patternAtlas, *lineAtlas, updateParameters.transformState}); + auto opaquePassCutOffEstimation = layerRenderItems.size(); + for (auto& renderItem : layerRenderItems) { + RenderLayer& renderLayer = renderItem.layer; + renderLayer.prepare({renderItem.source, *imageManager, *patternAtlas, *lineAtlas, updateParameters.transformState}); if (renderLayer.needsPlacement()) { layersNeedPlacement.emplace_back(renderLayer); } if (renderLayer.is3D() && renderTreeParameters->opaquePassCutOff == 0) { - renderTreeParameters->opaquePassCutOff = i; + --opaquePassCutOffEstimation; + renderTreeParameters->opaquePassCutOff = uint32_t(opaquePassCutOffEstimation); } } // Symbol placement.