summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2016-01-20 00:07:04 +0200
committerBruno de Oliveira Abinader <bruno@mapbox.com>2016-01-20 10:35:44 +0200
commit9cd9065031f7d2af62e437f2b32b44207484baca (patch)
tree7eaa326b4d183fc1d26ae64492588bbeb7a4b615 /include
parentd34f8eb674b9753c47616f37ae88ff7a02f61ba0 (diff)
downloadqtlocation-mapboxgl-9cd9065031f7d2af62e437f2b32b44207484baca.tar.gz
Revert "Revert WebP support due to broken builds"
This reverts commit 6709bdcacd5a45a10b554f3f225206c9494e5e43. There was an issue with the script that removes '-lwebp' from WebP linker flags, since we're statically linking. This is now fixed.
Diffstat (limited to 'include')
-rw-r--r--include/mbgl/util/image.hpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/mbgl/util/image.hpp b/include/mbgl/util/image.hpp
index fde42c7c5e..7927b777ea 100644
--- a/include/mbgl/util/image.hpp
+++ b/include/mbgl/util/image.hpp
@@ -21,6 +21,11 @@ public:
height(h),
data(std::make_unique<uint8_t[]>(size())) {}
+ Image(size_t w, size_t h, std::unique_ptr<uint8_t[]> data_)
+ : width(w),
+ height(h),
+ data(std::move(data_)) {}
+
size_t stride() const { return width * 4; }
size_t size() const { return width * height * 4; }