diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2016-05-23 11:49:40 +0200 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2016-05-23 18:04:31 +0200 |
commit | b9f23661f88ad1982a913ff78ed39a398b53b7e3 (patch) | |
tree | aa01bf6d8823e7037be867e1ed3f79424917be7a /src | |
parent | 7b4f5b86af532ecea9dba4221bcac94f93ba1f01 (diff) | |
download | qtlocation-mapboxgl-b9f23661f88ad1982a913ff78ed39a398b53b7e3.tar.gz |
[core] move RenderItem and GlyphRange to their own headers
Diffstat (limited to 'src')
-rw-r--r-- | src/mbgl/renderer/painter.hpp | 2 | ||||
-rw-r--r-- | src/mbgl/source/source.cpp | 1 | ||||
-rw-r--r-- | src/mbgl/style/render_item.hpp | 24 | ||||
-rw-r--r-- | src/mbgl/style/style.hpp | 17 | ||||
-rw-r--r-- | src/mbgl/text/glyph.hpp | 4 | ||||
-rw-r--r-- | src/mbgl/text/glyph_range.hpp | 13 |
6 files changed, 41 insertions, 20 deletions
diff --git a/src/mbgl/renderer/painter.hpp b/src/mbgl/renderer/painter.hpp index 0fe623a91d..ac05da62fd 100644 --- a/src/mbgl/renderer/painter.hpp +++ b/src/mbgl/renderer/painter.hpp @@ -13,8 +13,8 @@ #include <mbgl/gl/gl_config.hpp> +#include <mbgl/style/render_item.hpp> #include <mbgl/style/types.hpp> -#include <mbgl/style/style.hpp> #include <mbgl/gl/gl.hpp> diff --git a/src/mbgl/source/source.cpp b/src/mbgl/source/source.cpp index c80c6ac0b3..b4f9def3d4 100644 --- a/src/mbgl/source/source.cpp +++ b/src/mbgl/source/source.cpp @@ -23,7 +23,6 @@ #include <mbgl/tile/vector_tile_data.hpp> #include <mbgl/tile/raster_tile_data.hpp> -#include <mbgl/style/style.hpp> #include <mbgl/style/style_parser.hpp> #include <mbgl/gl/debugging.hpp> diff --git a/src/mbgl/style/render_item.hpp b/src/mbgl/style/render_item.hpp new file mode 100644 index 0000000000..6f15669654 --- /dev/null +++ b/src/mbgl/style/render_item.hpp @@ -0,0 +1,24 @@ +#ifndef MBGL_STYLE_RENDER_ITEM +#define MBGL_STYLE_RENDER_ITEM + +namespace mbgl { + +class StyleLayer; +class Tile; +class Bucket; + +struct RenderItem { + inline RenderItem(const StyleLayer& layer_, + const Tile* tile_ = nullptr, + Bucket* bucket_ = nullptr) + : tile(tile_), bucket(bucket_), layer(layer_) { + } + + const Tile* const tile; + Bucket* const bucket; + const StyleLayer& layer; +}; + +} // namespace mbgl + +#endif diff --git a/src/mbgl/style/style.hpp b/src/mbgl/style/style.hpp index 875973683a..eca1236697 100644 --- a/src/mbgl/style/style.hpp +++ b/src/mbgl/style/style.hpp @@ -1,7 +1,9 @@ #ifndef MBGL_STYLE_STYLE #define MBGL_STYLE_STYLE +#include <mbgl/style/render_item.hpp> #include <mbgl/style/zoom_history.hpp> +#include <mbgl/style/types.hpp> #include <mbgl/style/property_transition.hpp> #include <mbgl/source/source.hpp> @@ -27,24 +29,9 @@ class GlyphStore; class SpriteStore; class SpriteAtlas; class LineAtlas; -class StyleLayer; -class Tile; -class Bucket; class StyleUpdateParameters; class StyleQueryParameters; -struct RenderItem { - inline RenderItem(const StyleLayer& layer_, - const Tile* tile_ = nullptr, - Bucket* bucket_ = nullptr) - : tile(tile_), bucket(bucket_), layer(layer_) { - } - - const Tile* const tile; - Bucket* const bucket; - const StyleLayer& layer; -}; - struct RenderData { Color backgroundColor = {{ 0, 0, 0, 0 }}; std::set<Source*> sources; diff --git a/src/mbgl/text/glyph.hpp b/src/mbgl/text/glyph.hpp index 62949ee3fd..e4984be868 100644 --- a/src/mbgl/text/glyph.hpp +++ b/src/mbgl/text/glyph.hpp @@ -1,18 +1,16 @@ #ifndef MBGL_TEXT_GLYPH #define MBGL_TEXT_GLYPH +#include <mbgl/text/glyph_range.hpp> #include <mbgl/util/rect.hpp> #include <cstdint> -#include <utility> #include <vector> #include <string> #include <map> namespace mbgl { -typedef std::pair<uint16_t, uint16_t> GlyphRange; - // Note: this only works for the BMP GlyphRange getGlyphRange(char32_t glyph); diff --git a/src/mbgl/text/glyph_range.hpp b/src/mbgl/text/glyph_range.hpp new file mode 100644 index 0000000000..7a0c276df2 --- /dev/null +++ b/src/mbgl/text/glyph_range.hpp @@ -0,0 +1,13 @@ +#ifndef MBGL_TEXT_GLYPH_RANGE +#define MBGL_TEXT_GLYPH_RANGE + +#include <utility> +#include <cstdint> + +namespace mbgl { + +typedef std::pair<uint16_t, uint16_t> GlyphRange; + +} // end namespace mbgl + +#endif |