diff options
author | Dane Springmeyer <dane@mapbox.com> | 2019-10-24 12:45:43 -0700 |
---|---|---|
committer | Dane Springmeyer <dane@mapbox.com> | 2019-10-24 12:45:43 -0700 |
commit | 15822b52b87511b169d34f52b90b8768ab2ce8bc (patch) | |
tree | b8dbf4ca5c006bece7f7ba4badbd3c4cef73f658 | |
parent | cfd4a820d271a01d7aa50a8a81f2a2de9169f501 (diff) | |
download | qtlocation-mapboxgl-15822b52b87511b169d34f52b90b8768ab2ce8bc.tar.gz |
clear line atlas every frame + add more loggingnode-5.0.0-beta3
-rw-r--r-- | src/mbgl/geometry/line_atlas.cpp | 9 | ||||
-rw-r--r-- | src/mbgl/geometry/line_atlas.hpp | 1 | ||||
-rw-r--r-- | src/mbgl/renderer/render_orchestrator.cpp | 5 |
3 files changed, 3 insertions, 12 deletions
diff --git a/src/mbgl/geometry/line_atlas.cpp b/src/mbgl/geometry/line_atlas.cpp index 3a6838bdc1..3e2546427d 100644 --- a/src/mbgl/geometry/line_atlas.cpp +++ b/src/mbgl/geometry/line_atlas.cpp @@ -40,6 +40,7 @@ LinePatternPos LineAtlas::addDash(const std::vector<float>& dasharray, LinePatte const uint8_t offset = 128; if (dasharray.size() < 2) { + Log::Warning(Event::OpenGL, "line atlas dasharray too small"); return LinePatternPos(); } @@ -76,6 +77,7 @@ LinePatternPos LineAtlas::addDash(const std::vector<float>& dasharray, LinePatte while (right < x / stretch) { left = right; if (partIndex >= dasharray.size()) { + Log::Warning(Event::OpenGL, "line atlas dasharray invalid"); return LinePatternPos(); } right = right + dasharray[partIndex]; @@ -128,13 +130,6 @@ void LineAtlas::clear() { dirty = true; } -uint32_t LineAtlas::getSpace() const { - if (image.size.height > nextRow) { - return image.size.height - nextRow; - } - return 0; -} - Size LineAtlas::getSize() const { return image.size; } diff --git a/src/mbgl/geometry/line_atlas.hpp b/src/mbgl/geometry/line_atlas.hpp index 5a5cbd842c..93caa6bc09 100644 --- a/src/mbgl/geometry/line_atlas.hpp +++ b/src/mbgl/geometry/line_atlas.hpp @@ -41,7 +41,6 @@ public: LinePatternPos getDashPosition(const std::vector<float>&, LinePatternCap); LinePatternPos addDash(const std::vector<float>& dasharray, LinePatternCap); - uint32_t getSpace() const; void clear(); Size getSize() const; diff --git a/src/mbgl/renderer/render_orchestrator.cpp b/src/mbgl/renderer/render_orchestrator.cpp index 42524ff733..6b2e77ef1c 100644 --- a/src/mbgl/renderer/render_orchestrator.cpp +++ b/src/mbgl/renderer/render_orchestrator.cpp @@ -142,10 +142,7 @@ std::unique_ptr<RenderTree> RenderOrchestrator::createRenderTree(const UpdatePar if (!isMapModeContinuous) { // Reset zoom history state. zoomHistory.first = true; - if (lineAtlas->getSpace() < 32) { - Log::Warning(Event::OpenGL, "Line atlas free space hit %d: was cleared to avoid overflowing", lineAtlas->getSpace()); - lineAtlas->clear(); - } + lineAtlas->clear(); } if (LayerManager::annotationsEnabled) { |