blob: eebfbe6b9c9d4f3eaf8e64a2d61638f05ebd7ca2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
#pragma once
#include <mbgl/tile/tile.hpp>
#include <mbgl/tile/tile_source.hpp>
#include <mbgl/renderer/raster_bucket.hpp>
namespace mbgl {
class AsyncRequest;
class Tileset;
namespace gl { class TexturePool; }
namespace style {
class Layer;
class UpdateParameters;
}
class RasterTile : public Tile {
public:
RasterTile(const OverscaledTileID&,
const style::UpdateParameters&,
const Tileset&);
void setNecessity(Necessity) final;
void setError(std::exception_ptr err);
void setData(std::shared_ptr<const std::string> data,
optional<Timestamp> modified_,
optional<Timestamp> expires_);
void cancel() override;
Bucket* getBucket(const style::Layer&) override;
private:
gl::TexturePool& texturePool;
Worker& worker;
TileSource<RasterTile> tileSource;
std::unique_ptr<AsyncRequest> workRequest;
// Contains the Bucket object for the tile. Buckets are render
// objects and they get added by tile parsing operations.
std::unique_ptr<Bucket> bucket;
};
} // namespace mbgl
|