diff options
Diffstat (limited to 'src/mbgl/map/tile_data.hpp')
-rw-r--r-- | src/mbgl/map/tile_data.hpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/mbgl/map/tile_data.hpp b/src/mbgl/map/tile_data.hpp index fcbf25fb62..44f0304c8d 100644 --- a/src/mbgl/map/tile_data.hpp +++ b/src/mbgl/map/tile_data.hpp @@ -3,17 +3,18 @@ #include <mbgl/util/noncopyable.hpp> #include <mbgl/map/tile_id.hpp> -#include <mbgl/renderer/debug_bucket.hpp> -#include <mbgl/geometry/debug_font_buffer.hpp> +#include <mbgl/renderer/bucket.hpp> #include <atomic> #include <string> +#include <memory> #include <functional> namespace mbgl { class StyleLayer; class Worker; +class DebugBucket; class TileData : private util::noncopyable { public: @@ -57,6 +58,8 @@ public: obsolete }; + static const char* StateToString(State); + // Tile data considered "Ready" can be used for rendering. Data in // partial state is still waiting for network resources but can also // be rendered, although layers will be missing. @@ -65,14 +68,14 @@ public: } TileData(const TileID&); - virtual ~TileData() = default; + virtual ~TileData(); // Mark this tile as no longer needed and cancel any pending work. virtual void cancel() = 0; virtual Bucket* getBucket(const StyleLayer&) = 0; - virtual bool reparse(std::function<void ()>) { return true; } + virtual bool parsePending(std::function<void ()>) { return true; } virtual void redoPlacement(float, float, bool) {} bool isReady() const { @@ -90,14 +93,13 @@ public: const TileID id; // Contains the tile ID string for painting debug information. - DebugBucket debugBucket; - DebugFontBuffer debugFontBuffer; + std::unique_ptr<DebugBucket> debugBucket; protected: std::atomic<State> state; std::string error; }; -} +} // namespace mbgl #endif |