summaryrefslogtreecommitdiff
path: root/src/mbgl/renderer/painter.cpp
diff options
context:
space:
mode:
authorIvo van Dongen <info@ivovandongen.nl>2017-04-21 09:19:47 -0700
committerIvo van Dongen <ivovandongen@users.noreply.github.com>2017-04-25 17:23:54 -0700
commit3c175adf30546fe58713b8fed29ac35a85e150be (patch)
tree5666e9bcf311ed1b86a13444e50dc7a030c10da9 /src/mbgl/renderer/painter.cpp
parentea8ec38df156c6683c886253dbb1f6bc828686ff (diff)
downloadqtlocation-mapboxgl-3c175adf30546fe58713b8fed29ac35a85e150be.tar.gz
[core] split off render layers
Diffstat (limited to 'src/mbgl/renderer/painter.cpp')
-rw-r--r--src/mbgl/renderer/painter.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/mbgl/renderer/painter.cpp b/src/mbgl/renderer/painter.cpp
index f7a498ecae..0c4915d3e9 100644
--- a/src/mbgl/renderer/painter.cpp
+++ b/src/mbgl/renderer/painter.cpp
@@ -13,8 +13,8 @@
#include <mbgl/style/style.hpp>
#include <mbgl/style/layer_impl.hpp>
-#include <mbgl/style/layers/background_layer.hpp>
-#include <mbgl/style/layers/custom_layer.hpp>
+#include <mbgl/renderer/render_background_layer.hpp>
+#include <mbgl/renderer/render_custom_layer.hpp>
#include <mbgl/style/layers/custom_layer_impl.hpp>
#include <mbgl/sprite/sprite_atlas.hpp>
@@ -279,16 +279,16 @@ void Painter::renderPass(PaintParameters& parameters,
currentLayer = i;
const auto& item = *it;
- const Layer& layer = item.layer;
+ const RenderLayer& layer = item.layer;
- if (!layer.baseImpl->hasRenderPass(pass))
+ if (!layer.hasRenderPass(pass))
continue;
- if (layer.is<BackgroundLayer>()) {
+ if (layer.is<RenderBackgroundLayer>()) {
MBGL_DEBUG_GROUP(context, "background");
- renderBackground(parameters, *layer.as<BackgroundLayer>());
- } else if (layer.is<CustomLayer>()) {
- MBGL_DEBUG_GROUP(context, layer.baseImpl->id + " - custom");
+ renderBackground(parameters, *layer.as<RenderBackgroundLayer>());
+ } else if (layer.is<RenderCustomLayer>()) {
+ MBGL_DEBUG_GROUP(context, layer.baseImpl.id + " - custom");
// Reset GL state to a known state so the CustomLayer always has a clean slate.
context.vertexArrayObject = 0;
@@ -296,14 +296,14 @@ void Painter::renderPass(PaintParameters& parameters,
context.setStencilMode(gl::StencilMode::disabled());
context.setColorMode(colorModeForRenderPass());
- layer.as<CustomLayer>()->impl->render(state);
+ layer.as<RenderCustomLayer>()->impl->render(state);
// Reset the view back to our original one, just in case the CustomLayer changed
// the viewport or Framebuffer.
parameters.view.bind();
context.setDirtyState();
} else {
- MBGL_DEBUG_GROUP(context, layer.baseImpl->id + " - " + util::toString(item.tile->id));
+ MBGL_DEBUG_GROUP(context, layer.baseImpl.id + " - " + util::toString(item.tile->id));
item.bucket->render(*this, parameters, layer, *item.tile);
}
}