diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2017-08-12 16:12:58 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2017-08-24 13:06:23 -0700 |
commit | 28be432041a8735d085b9740d32a422e51a01b74 (patch) | |
tree | 519f248d08a79ce0e24ec3ff166ff5f0b0c1c871 /src | |
parent | 4dd30db7cb3118822a6b5bc242e736a7688bb404 (diff) | |
download | qtlocation-mapboxgl-28be432041a8735d085b9740d32a422e51a01b74.tar.gz |
[core] Eliminate temporary sources set
Diffstat (limited to 'src')
-rw-r--r-- | src/mbgl/renderer/renderer_impl.cpp | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/src/mbgl/renderer/renderer_impl.cpp b/src/mbgl/renderer/renderer_impl.cpp index 1a8af29485..62fbba039f 100644 --- a/src/mbgl/renderer/renderer_impl.cpp +++ b/src/mbgl/renderer/renderer_impl.cpp @@ -254,13 +254,6 @@ void Renderer::Impl::render(const UpdateParameters& updateParameters) { parameters.context.setDirtyState(); } - std::unordered_set<RenderSource*> sources; - for (const auto& entry : renderSources) { - if (entry.second->isEnabled()) { - sources.insert(entry.second.get()); - } - } - Color backgroundColor; class RenderItem { @@ -397,8 +390,10 @@ void Renderer::Impl::render(const UpdateParameters& updateParameters) { MBGL_DEBUG_GROUP(parameters.context, "clip"); // Update all clipping IDs. - for (const auto& source : sources) { - source->startRender(parameters); + for (const auto& entry : renderSources) { + if (entry.second->isEnabled()) { + entry.second->startRender(parameters); + } } MBGL_DEBUG_GROUP(parameters.context, "clipping masks"); @@ -532,8 +527,10 @@ void Renderer::Impl::render(const UpdateParameters& updateParameters) { // This guarantees that we have at least one function per tile called. // When only rendering layers via the stylesheet, it's possible that we don't // ever visit a tile during rendering. - for (const auto& source : sources) { - source->finishRender(parameters); + for (const auto& entry : renderSources) { + if (entry.second->isEnabled()) { + entry.second->finishRender(parameters); + } } } |