summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2019-06-12 16:53:52 +0300
committerMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2019-06-25 12:53:52 +0300
commitc09cbaf6e0a62fa39cddf3042afeda5e9fd92a77 (patch)
tree175e5e53ccf9c3db9dff110889065b1255c41379 /src
parentcfe11f563d1b6828d21d80df59ab52732b736e22 (diff)
downloadqtlocation-mapboxgl-c09cbaf6e0a62fa39cddf3042afeda5e9fd92a77.tar.gz
[core] PaintParameters do not need UpdateParameters
Diffstat (limited to 'src')
-rw-r--r--src/mbgl/renderer/paint_parameters.cpp14
-rw-r--r--src/mbgl/renderer/paint_parameters.hpp9
-rw-r--r--src/mbgl/renderer/renderer_impl.cpp4
3 files changed, 17 insertions, 10 deletions
diff --git a/src/mbgl/renderer/paint_parameters.cpp b/src/mbgl/renderer/paint_parameters.cpp
index badd60a53e..5034850264 100644
--- a/src/mbgl/renderer/paint_parameters.cpp
+++ b/src/mbgl/renderer/paint_parameters.cpp
@@ -28,8 +28,10 @@ TransformParameters::TransformParameters(const TransformState& state_)
PaintParameters::PaintParameters(gfx::Context& context_,
float pixelRatio_,
gfx::RendererBackend& backend_,
- const UpdateParameters& updateParameters,
const EvaluatedLight& evaluatedLight_,
+ MapMode mode_,
+ MapDebugOptions debugOptions_,
+ TimePoint timePoint_,
const TransformParameters& transformParams_,
RenderStaticData& staticData_,
LineAtlas& lineAtlas_,
@@ -37,15 +39,15 @@ PaintParameters::PaintParameters(gfx::Context& context_,
: context(context_),
backend(backend_),
encoder(context.createCommandEncoder()),
- state(updateParameters.transformState),
- evaluatedLight(evaluatedLight_),
transformParams(transformParams_),
+ state(transformParams_.state),
+ evaluatedLight(evaluatedLight_),
staticData(staticData_),
lineAtlas(lineAtlas_),
patternAtlas(patternAtlas_),
- mapMode(updateParameters.mode),
- debugOptions(updateParameters.debugOptions),
- timePoint(updateParameters.timePoint),
+ mapMode(mode_),
+ debugOptions(debugOptions_),
+ timePoint(timePoint_),
pixelRatio(pixelRatio_),
#ifndef NDEBUG
programs((debugOptions & MapDebugOptions::Overdraw) ? staticData_.overdrawPrograms : staticData_.programs)
diff --git a/src/mbgl/renderer/paint_parameters.hpp b/src/mbgl/renderer/paint_parameters.hpp
index 89084e9e52..5fb5cd2096 100644
--- a/src/mbgl/renderer/paint_parameters.hpp
+++ b/src/mbgl/renderer/paint_parameters.hpp
@@ -3,6 +3,7 @@
#include <mbgl/renderer/render_pass.hpp>
#include <mbgl/renderer/render_light.hpp>
#include <mbgl/map/mode.hpp>
+#include <mbgl/map/transform_state.hpp>
#include <mbgl/gfx/depth_mode.hpp>
#include <mbgl/gfx/stencil_mode.hpp>
#include <mbgl/gfx/color_mode.hpp>
@@ -39,7 +40,7 @@ public:
mat4 projMatrix;
mat4 alignedProjMatrix;
mat4 nearClippedProjMatrix;
- const TransformState& state;
+ const TransformState state;
};
class PaintParameters {
@@ -47,8 +48,10 @@ public:
PaintParameters(gfx::Context&,
float pixelRatio,
gfx::RendererBackend&,
- const UpdateParameters&,
const EvaluatedLight&,
+ MapMode,
+ MapDebugOptions,
+ TimePoint,
const TransformParameters&,
RenderStaticData&,
LineAtlas&,
@@ -60,9 +63,9 @@ public:
std::unique_ptr<gfx::CommandEncoder> encoder;
std::unique_ptr<gfx::RenderPass> renderPass;
+ TransformParameters transformParams;
const TransformState& state;
const EvaluatedLight& evaluatedLight;
- const TransformParameters& transformParams;
RenderStaticData& staticData;
LineAtlas& lineAtlas;
diff --git a/src/mbgl/renderer/renderer_impl.cpp b/src/mbgl/renderer/renderer_impl.cpp
index b651277104..d77a482df7 100644
--- a/src/mbgl/renderer/renderer_impl.cpp
+++ b/src/mbgl/renderer/renderer_impl.cpp
@@ -364,8 +364,10 @@ void Renderer::Impl::render(const UpdateParameters& updateParameters) {
context,
pixelRatio,
backend,
- updateParameters,
renderLight.getEvaluated(),
+ updateParameters.mode,
+ updateParameters.debugOptions,
+ updateParameters.timePoint,
transformParams,
*staticData,
*lineAtlas,