Revert WebP support due to broken builds

This reverts commits 2010fbb0e6, a361ce47a1, and d004bb275a.
This commit is contained in:
John Firebaugh
2016-01-19 13:32:22 -08:00
parent 2010fbb0e6
commit 6709bdcacd
10 changed files with 3 additions and 76 deletions

View File

@@ -1,27 +0,0 @@
#include <mbgl/util/image.hpp>
#include <mbgl/util/premultiply.hpp>
#include <mbgl/platform/log.hpp>
extern "C"
{
#include <webp/decode.h>
}
namespace mbgl {
PremultipliedImage decodeWebP(const uint8_t* data, size_t size) {
int width = 0, height = 0;
if (WebPGetInfo(data, size, &width, &height) == 0) {
throw std::runtime_error("failed to retrieve WebP basic header information");
}
std::unique_ptr<uint8_t[]> webp(WebPDecodeRGBA(data, size, &width, &height));
if (!webp) {
throw std::runtime_error("failed to decode WebP data");
}
UnassociatedImage image { size_t(width), size_t(height), std::move(webp) };
return util::premultiply(std::move(image));
}
} // namespace mbgl