diff options
author | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2019-07-01 21:44:15 +0300 |
---|---|---|
committer | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2019-07-04 16:56:43 +0300 |
commit | 63dd17e2bbdb2c956789865c1d517305f860a175 (patch) | |
tree | 6888c96f50df988e55b5722dd870db98fdd877b5 /src/mbgl/tile/tile.hpp | |
parent | b1cbc2f2451d6eea9a8ad2adde1c8087ab581192 (diff) | |
download | qtlocation-mapboxgl-63dd17e2bbdb2c956789865c1d517305f860a175.tar.gz |
[core] Introduce TileRenderData
Remove rendering functionality from Tile implementations.
Diffstat (limited to 'src/mbgl/tile/tile.hpp')
-rw-r--r-- | src/mbgl/tile/tile.hpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/mbgl/tile/tile.hpp b/src/mbgl/tile/tile.hpp index 17a16b4666..4ba8bc1160 100644 --- a/src/mbgl/tile/tile.hpp +++ b/src/mbgl/tile/tile.hpp @@ -24,6 +24,7 @@ class LayerRenderData; class TransformState; class TileObserver; class RenderLayer; +class TileRenderData; class RenderedQueryOptions; class SourceQueryOptions; class CollisionIndex; @@ -45,6 +46,8 @@ public: Tile(Kind, OverscaledTileID); virtual ~Tile(); + virtual std::unique_ptr<TileRenderData> createRenderData() = 0; + void setObserver(TileObserver* observer); virtual void setNecessity(TileNecessity) {} @@ -52,12 +55,6 @@ public: // Mark this tile as no longer needed and cancel any pending work. virtual void cancel(); - virtual void upload(gfx::UploadPass&) = 0; - virtual Bucket* getBucket(const style::Layer::Impl&) const = 0; - virtual const LayerRenderData* getLayerRenderData(const style::Layer::Impl&) const { - assert(false); - return nullptr; - } // Notifies this tile of the updated layer properties. // // Tile implementation should update the contained layer @@ -65,9 +62,7 @@ public: // // Returns `true` if the corresponding render layer data is present in this tile (and i.e. it // was succesfully updated); returns `false` otherwise. - virtual bool layerPropertiesUpdated(const Immutable<style::LayerProperties>& layerProperties) { - return bool(getBucket(*layerProperties->baseImpl)); - } + virtual bool layerPropertiesUpdated(const Immutable<style::LayerProperties>& layerProperties) = 0; virtual void setShowCollisionBoxes(const bool) {} virtual void setLayers(const std::vector<Immutable<style::LayerProperties>>&) {} virtual void setMask(TileMask&&) {} |