[core] move RenderItem and GlyphRange to their own headers

This commit is contained in:
Konstantin Käfer
2016-05-23 11:49:40 +02:00
parent 7b4f5b86af
commit b9f23661f8
6 changed files with 41 additions and 20 deletions

View File

@@ -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>

View File

@@ -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>

View File

@@ -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

View File

@@ -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;

View File

@@ -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);

View File

@@ -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