summaryrefslogtreecommitdiff
path: root/platform/default/mbgl/gl/offscreen_view.hpp
blob: eb888272e535b2aa715d598d23aca5b9b4df9f49 (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
#pragma once

#include <mbgl/map/view.hpp>
#include <mbgl/util/image.hpp>

namespace mbgl {

namespace gl {
class Context;
} // namespace gl

class OffscreenView : public View {
public:
    OffscreenView(gl::Context&, Size size = { 256, 256 });
    ~OffscreenView() override;

    void bind() override;

    PremultipliedImage readStillImage();

    const Size& getSize() const;

private:
    class Impl;
    const std::unique_ptr<Impl> impl;
};

} // namespace mbgl