diff options
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()); |