summaryrefslogtreecommitdiff
path: root/src/mbgl/tile/tile.hpp
diff options
context:
space:
mode:
authorMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2019-07-01 21:44:15 +0300
committerMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2019-07-02 17:50:31 +0300
commit35c68466d7f5929da61873a8e5359b6db88b0363 (patch)
tree078c1efa3f26a3b5d9d078b22eb94c970184a078 /src/mbgl/tile/tile.hpp
parent31419c2644cb75afb7508aa9d08403b7cbd9184c (diff)
downloadqtlocation-mapboxgl-35c68466d7f5929da61873a8e5359b6db88b0363.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.hpp13
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&&) {}