diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2016-01-20 00:07:04 +0200 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2016-01-20 10:35:44 +0200 |
commit | 9cd9065031f7d2af62e437f2b32b44207484baca (patch) | |
tree | 7eaa326b4d183fc1d26ae64492588bbeb7a4b615 /src | |
parent | d34f8eb674b9753c47616f37ae88ff7a02f61ba0 (diff) | |
download | qtlocation-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 'src')
-rw-r--r-- | src/mbgl/util/mapbox.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mbgl/util/mapbox.cpp b/src/mbgl/util/mapbox.cpp index 067c9918cc..d94a9a5f7d 100644 --- a/src/mbgl/util/mapbox.cpp +++ b/src/mbgl/util/mapbox.cpp @@ -129,6 +129,12 @@ std::string normalizeRasterTileURL(const std::string& url) { } std::string normalizedURL(url); +#if !defined(__ANDROID__) && !defined(__APPLE__) + // Replace PNG with WebP. + if (normalizedURL.compare(extensionIdx + 1, 3, "png") == 0) { + normalizedURL.replace(extensionIdx + 1, 3, "webp"); + } +#endif // !defined(__ANDROID__) && !defined(__APPLE__) normalizedURL.insert(extensionIdx, "{ratio}"); return normalizedURL; } |