summaryrefslogtreecommitdiff
path: root/src/mbgl/map/raster_tile_data.hpp
blob: f5711e506adf26c01f4849cfe0d0f37763c1fe4c (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
#ifndef MBGL_MAP_RASTER_TILE_DATA
#define MBGL_MAP_RASTER_TILE_DATA

#include <mbgl/map/tile_data.hpp>
#include <mbgl/style/style_properties.hpp>
#include <mbgl/renderer/raster_bucket.hpp>

namespace mbgl {

class SourceInfo;
class Request;
class StyleLayer;
class TexturePool;
class WorkRequest;

class RasterTileData : public TileData {
public:
    RasterTileData(const TileID&, TexturePool&, const SourceInfo&, Worker&);
    ~RasterTileData();

    void request(float pixelRatio,
                 const std::function<void()>& callback);

    void cancel() override;

    Bucket* getBucket(StyleLayer const &layer_desc) override;

private:
    const SourceInfo& source;
    Worker& worker;
    Request* req = nullptr;

    RasterLayoutProperties layout;
    RasterBucket bucket;

    std::unique_ptr<WorkRequest> workRequest;
};

}

#endif