summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2019-06-12 13:33:40 +0300
committerMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2019-06-25 12:53:52 +0300
commitcfe11f563d1b6828d21d80df59ab52732b736e22 (patch)
tree386a23bf08ce691d4889435ba1782544ebdc9316
parent23d8ae5e738741c2c31e82e9b33a8c05f21ea3d6 (diff)
downloadqtlocation-mapboxgl-cfe11f563d1b6828d21d80df59ab52732b736e22.tar.gz
[core] Remove RenderPass::Upload
-rw-r--r--src/mbgl/renderer/layers/render_heatmap_layer.cpp2
-rw-r--r--src/mbgl/renderer/layers/render_line_layer.cpp2
-rw-r--r--src/mbgl/renderer/layers/render_symbol_layer.cpp2
-rw-r--r--src/mbgl/renderer/render_pass.hpp1
-rw-r--r--src/mbgl/renderer/renderer_impl.cpp5
5 files changed, 4 insertions, 8 deletions
diff --git a/src/mbgl/renderer/layers/render_heatmap_layer.cpp b/src/mbgl/renderer/layers/render_heatmap_layer.cpp
index e6dddf501b..4b80dee5e7 100644
--- a/src/mbgl/renderer/layers/render_heatmap_layer.cpp
+++ b/src/mbgl/renderer/layers/render_heatmap_layer.cpp
@@ -41,7 +41,7 @@ void RenderHeatmapLayer::evaluate(const PropertyEvaluationParameters& parameters
unevaluated.evaluate(parameters));
passes = (properties->evaluated.get<style::HeatmapOpacity>() > 0)
- ? (RenderPass::Translucent | RenderPass::Pass3D | RenderPass::Upload)
+ ? (RenderPass::Translucent | RenderPass::Pass3D)
: RenderPass::None;
evaluatedProperties = std::move(properties);
diff --git a/src/mbgl/renderer/layers/render_line_layer.cpp b/src/mbgl/renderer/layers/render_line_layer.cpp
index 2fd48045e9..595140634d 100644
--- a/src/mbgl/renderer/layers/render_line_layer.cpp
+++ b/src/mbgl/renderer/layers/render_line_layer.cpp
@@ -47,7 +47,7 @@ void RenderLineLayer::evaluate(const PropertyEvaluationParameters& parameters) {
passes = (evaluated.get<style::LineOpacity>().constantOr(1.0) > 0
&& evaluated.get<style::LineColor>().constantOr(Color::black()).a > 0
&& evaluated.get<style::LineWidth>().constantOr(1.0) > 0)
- ? RenderPass::Translucent | RenderPass::Upload : RenderPass::None;
+ ? RenderPass::Translucent : RenderPass::None;
evaluatedProperties = std::move(properties);
}
diff --git a/src/mbgl/renderer/layers/render_symbol_layer.cpp b/src/mbgl/renderer/layers/render_symbol_layer.cpp
index 51af6fa817..33b095b7e7 100644
--- a/src/mbgl/renderer/layers/render_symbol_layer.cpp
+++ b/src/mbgl/renderer/layers/render_symbol_layer.cpp
@@ -262,7 +262,7 @@ void RenderSymbolLayer::evaluate(const PropertyEvaluationParameters& parameters)
passes = ((evaluated.get<style::IconOpacity>().constantOr(1) > 0 && hasIconOpacity && iconSize > 0)
|| (evaluated.get<style::TextOpacity>().constantOr(1) > 0 && hasTextOpacity && textSize > 0))
- ? RenderPass::Translucent | RenderPass::Upload : RenderPass::None;
+ ? RenderPass::Translucent : RenderPass::None;
evaluatedProperties = std::move(properties);
}
diff --git a/src/mbgl/renderer/render_pass.hpp b/src/mbgl/renderer/render_pass.hpp
index ee0a846d7e..5d18304129 100644
--- a/src/mbgl/renderer/render_pass.hpp
+++ b/src/mbgl/renderer/render_pass.hpp
@@ -12,7 +12,6 @@ enum class RenderPass : uint8_t {
Opaque = 1 << 0,
Translucent = 1 << 1,
Pass3D = 1 << 2,
- Upload = 1 << 3,
};
MBGL_CONSTEXPR RenderPass operator|(RenderPass a, RenderPass b) {
diff --git a/src/mbgl/renderer/renderer_impl.cpp b/src/mbgl/renderer/renderer_impl.cpp
index 9ab65e57bf..b651277104 100644
--- a/src/mbgl/renderer/renderer_impl.cpp
+++ b/src/mbgl/renderer/renderer_impl.cpp
@@ -387,10 +387,7 @@ void Renderer::Impl::render(const UpdateParameters& updateParameters) {
}
for (auto& renderItem : renderItems) {
- RenderLayer& renderLayer = renderItem.layer;
- if (renderLayer.hasRenderPass(RenderPass::Upload)) {
- renderLayer.upload(*uploadPass);
- }
+ renderItem.layer.get().upload(*uploadPass);
}
staticData->upload(*uploadPass);