diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2016-01-18 17:08:55 +0200 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2016-01-19 16:06:36 +0200 |
commit | a361ce47a19d37b96b48cd605c62c5ab79bba462 (patch) | |
tree | 269a1ee9996d9a69a398438ae42fbe16c78025b1 /include/mbgl/util/image.hpp | |
parent | d004bb275ae3ea60bb6c2febd6fa22f1f51c3993 (diff) | |
download | qtlocation-mapboxgl-a361ce47a19d37b96b48cd605c62c5ab79bba462.tar.gz |
[linux] Added WebP tile support
- Android support is currently disabled due to a libwebp build issue.
- iOS and OS X support will appear after the next Mapbox iOS SDK release.
Related: #https://github.com/mapbox/mapbox-gl-native/issues/2354
Diffstat (limited to 'include/mbgl/util/image.hpp')
-rw-r--r-- | include/mbgl/util/image.hpp | 5 |
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; } |