diff options
author | Lauren Budorick <lauren@mapbox.com> | 2014-08-06 17:40:48 -0700 |
---|---|---|
committer | Lauren Budorick <lauren@mapbox.com> | 2014-08-11 12:13:22 -0700 |
commit | 560cc112e1e281ae57743fbabfa629203b09ffb1 (patch) | |
tree | 49fa057f3085f0707958299c3347dd19443e1711 /include/mbgl/style | |
parent | 9e1156d660cfe220db25c4f21de2aec2ed175487 (diff) | |
download | qtlocation-mapboxgl-560cc112e1e281ae57743fbabfa629203b09ffb1.tar.gz |
rm rasterize_properties, should be close to working...doesn't work
Diffstat (limited to 'include/mbgl/style')
-rw-r--r-- | include/mbgl/style/rasterize_properties.hpp | 38 | ||||
-rw-r--r-- | include/mbgl/style/style_bucket.hpp | 2 | ||||
-rw-r--r-- | include/mbgl/style/style_layer.hpp | 6 | ||||
-rw-r--r-- | include/mbgl/style/style_parser.hpp | 2 |
4 files changed, 1 insertions, 47 deletions
diff --git a/include/mbgl/style/rasterize_properties.hpp b/include/mbgl/style/rasterize_properties.hpp deleted file mode 100644 index e156ede77b..0000000000 --- a/include/mbgl/style/rasterize_properties.hpp +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef MBGL_STYLE_RASTERIZE_PROPERTIES -#define MBGL_STYLE_RASTERIZE_PROPERTIES - -#include <mbgl/style/function_properties.hpp> - -namespace mbgl { - -// The calculated properties for a layer in a tile. -class RasterizedProperties { -public: - float buffer = 1.0f / 32.0f; - uint16_t size = 256; - uint8_t blur = 0; -}; - -class RasterizeProperties { -public: - Function<bool> enabled = ConstantFunction<bool>(false); // maybe delete? - Function<float> buffer = ConstantFunction<float>(1.0f / 32.0f); - Function<float> size = ConstantFunction<float>(256); - Function<float> blur = ConstantFunction<float>(0); - -// inline bool isEnabled(const int8_t z) const { -// return util::apply_visitor(FunctionEvaluator<bool>(z), enabled); -// } - - inline RasterizedProperties get(const int8_t z) const { - RasterizedProperties properties; - properties.buffer = util::apply_visitor(FunctionEvaluator<float>(z), buffer); - properties.size = util::apply_visitor(FunctionEvaluator<float>(z), size); - properties.blur = util::apply_visitor(FunctionEvaluator<float>(z), blur); - return properties; - } -}; - -} - -#endif diff --git a/include/mbgl/style/style_bucket.hpp b/include/mbgl/style/style_bucket.hpp index 5cb1b69312..11b87d849d 100644 --- a/include/mbgl/style/style_bucket.hpp +++ b/include/mbgl/style/style_bucket.hpp @@ -83,7 +83,7 @@ public: class StyleBucketRaster { public: bool prerendered = false; - uint16_t raster_size = 256; + uint16_t size = 256; float blur = 0.0f; float buffer = 0.03125f; }; diff --git a/include/mbgl/style/style_layer.hpp b/include/mbgl/style/style_layer.hpp index bcda9950a2..f8cfff7f63 100644 --- a/include/mbgl/style/style_layer.hpp +++ b/include/mbgl/style/style_layer.hpp @@ -4,7 +4,6 @@ #include <mbgl/style/class_dictionary.hpp> #include <mbgl/style/class_properties.hpp> #include <mbgl/style/style_properties.hpp> -#include <mbgl/style/rasterize_properties.hpp> #include <mbgl/style/applied_class_properties.hpp> #include <vector> @@ -79,11 +78,6 @@ public: // layer's type. StyleProperties properties; - // Rasterization properties are used for prerendering the tile to a bitmap, - // which is then used as a raster image instead of rendering this layer - // directly in every frame. -// const std::unique_ptr<const RasterizeProperties> rasterize; - // Child layer array (if this layer has child layers). std::shared_ptr<StyleLayerGroup> layers; }; diff --git a/include/mbgl/style/style_parser.hpp b/include/mbgl/style/style_parser.hpp index 8b8dc74f21..e4e1b7f632 100644 --- a/include/mbgl/style/style_parser.hpp +++ b/include/mbgl/style/style_parser.hpp @@ -6,7 +6,6 @@ #include <mbgl/style/style_source.hpp> #include <mbgl/style/filter_expression.hpp> #include <mbgl/style/class_properties.hpp> -#include <mbgl/style/rasterize_properties.hpp> #include <mbgl/style/style_bucket.hpp> #include <unordered_map> @@ -52,7 +51,6 @@ private: void parseLayer(std::pair<JSVal, std::shared_ptr<StyleLayer>> &pair); void parseStyles(JSVal value, std::map<ClassID, ClassProperties> &styles); void parseStyle(JSVal, ClassProperties &properties); - std::unique_ptr<RasterizeProperties> parseRasterize(JSVal value); void parseReference(JSVal value, std::shared_ptr<StyleLayer> &layer); void parseBucket(JSVal value, std::shared_ptr<StyleLayer> &layer); void parseRender(JSVal value, std::shared_ptr<StyleLayer> &layer); |