summaryrefslogtreecommitdiff
path: root/src/mbgl/renderer/style_diff.hpp
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2017-05-30 13:40:36 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2017-06-05 19:38:08 -0700
commit591af0021bfb8b9fdfd803b55fb6c18a24c46943 (patch)
treeb0952184aca90ddda6ce170c4e2cc287824fbf54 /src/mbgl/renderer/style_diff.hpp
parent32589c271c6f4885dadb6291c4bf637b72659a9f (diff)
downloadqtlocation-mapboxgl-591af0021bfb8b9fdfd803b55fb6c18a24c46943.tar.gz
[core] Refactor RenderSource updates
* Eliminate updateBatch in favor of diffing layers and detecting changes to properties upon which layout depends. * Replace RenderSource::{update,remove,invalidate,reload}Tiles with a single update method * Replace TilePyramid::{update,remove,invalidate,reload}Tiles with a single update method * Remove Style& dependency TODO from GeometryTile and TileParameters
Diffstat (limited to 'src/mbgl/renderer/style_diff.hpp')
-rw-r--r--src/mbgl/renderer/style_diff.hpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mbgl/renderer/style_diff.hpp b/src/mbgl/renderer/style_diff.hpp
index 0ebb1fbfd6..285d1e12ed 100644
--- a/src/mbgl/renderer/style_diff.hpp
+++ b/src/mbgl/renderer/style_diff.hpp
@@ -1,3 +1,5 @@
+#pragma once
+
#include <mbgl/style/image_impl.hpp>
#include <mbgl/style/source_impl.hpp>
#include <mbgl/style/layer_impl.hpp>
@@ -13,7 +15,7 @@ class StyleDifference {
public:
std::unordered_map<std::string, T> added;
std::unordered_map<std::string, T> removed;
- std::unordered_map<std::string, T> changed;
+ std::unordered_map<std::string, std::array<T, 2>> changed;
};
using ImmutableImage = Immutable<style::Image::Impl>;
@@ -34,4 +36,6 @@ using LayerDifference = StyleDifference<ImmutableLayer>;
LayerDifference diffLayers(const std::vector<ImmutableLayer>&,
const std::vector<ImmutableLayer>&);
+bool hasLayoutDifference(const LayerDifference&, const std::string& layerID);
+
} // namespace mbgl