summaryrefslogtreecommitdiff
path: root/common/headless_view.hpp
diff options
context:
space:
mode:
authorMike Morris <michael.patrick.morris@gmail.com>2014-10-08 15:31:41 -0400
committerMike Morris <michael.patrick.morris@gmail.com>2014-10-08 15:31:41 -0400
commita1bc8c766d6e204a44e2c7171a80330e123b582b (patch)
tree9432d1128dfb13316695d1d320464fa0dcbfe1d2 /common/headless_view.hpp
parent799ca683dfe1913618a965773103b88d41244bcd (diff)
downloadqtlocation-mapboxgl-a1bc8c766d6e204a44e2c7171a80330e123b582b.tar.gz
add HeadlessView::readPixels, fixes #480
Diffstat (limited to 'common/headless_view.hpp')
-rw-r--r--common/headless_view.hpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/common/headless_view.hpp b/common/headless_view.hpp
index 13a5b01099..b59366349e 100644
--- a/common/headless_view.hpp
+++ b/common/headless_view.hpp
@@ -26,6 +26,7 @@ public:
void createContext();
void resize(uint16_t width, uint16_t height, float pixelRatio);
+ const std::unique_ptr<uint32_t[]>* readPixels();
void notify_map_change(MapChange change, timestamp delay = 0);
void make_active();
@@ -36,9 +37,11 @@ public:
private:
void clear_buffers();
-
private:
std::shared_ptr<HeadlessDisplay> display_;
+ uint16_t width_;
+ uint16_t height_;
+ float pixelRatio_;
#if MBGL_USE_CGL
CGLContextObj gl_context;