[core] move RenderItem and GlyphRange to their own headers
This commit is contained in:
@@ -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>
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
24
src/mbgl/style/render_item.hpp
Normal file
24
src/mbgl/style/render_item.hpp
Normal 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
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
13
src/mbgl/text/glyph_range.hpp
Normal file
13
src/mbgl/text/glyph_range.hpp
Normal 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
|
||||
Reference in New Issue
Block a user