diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2014-10-31 17:06:32 -0400 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2014-10-31 17:06:32 -0400 |
commit | 16bd75c6ccc0340295d65e04728239a7eea693dd (patch) | |
tree | ba633465bfcef203be726fc023a48d3f9239a0ba /platform/default/headless_view.cpp | |
parent | bc7effdd8646d2492cf276d9a87828e784eb8945 (diff) | |
parent | d0f71242da3e5a84e3c0ba54d63a889da7a11f2e (diff) | |
download | qtlocation-mapboxgl-16bd75c6ccc0340295d65e04728239a7eea693dd.tar.gz |
Merge pull request #527 from mapbox/platform-image
Use platform-specific routines for decoding/encoding images
Diffstat (limited to 'platform/default/headless_view.cpp')
-rw-r--r-- | platform/default/headless_view.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/platform/default/headless_view.cpp b/platform/default/headless_view.cpp index ec5c4aabec..71096beba0 100644 --- a/platform/default/headless_view.cpp +++ b/platform/default/headless_view.cpp @@ -181,11 +181,11 @@ void HeadlessView::resize(uint16_t width, uint16_t height, float pixelRatio) { make_inactive(); } -const std::unique_ptr<uint32_t[]> HeadlessView::readPixels() { +std::unique_ptr<uint32_t[]> HeadlessView::readPixels() { const unsigned int w = width_ * pixelRatio_; const unsigned int h = height_ * pixelRatio_; - std::unique_ptr<uint32_t[]> pixels(new uint32_t[w * h]); + auto pixels = std::unique_ptr<uint32_t[]>(new uint32_t[w * h]); make_active(); glReadPixels(0, 0, width_, height_, GL_RGBA, GL_UNSIGNED_BYTE, pixels.get()); |