[core] Refactor wireframe to match JS overdraw mode

This commit is contained in:
Bruno de Oliveira Abinader
2016-06-18 19:11:30 +03:00
parent 7e549b9020
commit df5a395708
13 changed files with 91 additions and 70 deletions

View File

@@ -258,7 +258,7 @@ bool Style::isLoaded() const {
return true;
}
RenderData Style::getRenderData() const {
RenderData Style::getRenderData(MapDebugOptions debugOptions) const {
RenderData result;
for (const auto& source : sources) {
@@ -272,6 +272,11 @@ RenderData Style::getRenderData() const {
continue;
if (const BackgroundLayer* background = layer->as<BackgroundLayer>()) {
if (debugOptions & MapDebugOptions::Wireframe) {
// We want to skip glClear optimization in wireframe mode.
result.order.emplace_back(*layer);
continue;
}
const BackgroundPaintProperties& paint = background->impl->paint;
if (layer.get() == layers[0].get() && paint.backgroundPattern.value.from.empty()) {
// This is a solid background. We can use glClear().