summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2016-01-18 17:08:55 +0200
committerBruno de Oliveira Abinader <bruno@mapbox.com>2016-01-19 16:06:36 +0200
commita361ce47a19d37b96b48cd605c62c5ab79bba462 (patch)
tree269a1ee9996d9a69a398438ae42fbe16c78025b1 /test
parentd004bb275ae3ea60bb6c2febd6fa22f1f51c3993 (diff)
downloadqtlocation-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 'test')
-rw-r--r--test/fixtures/image/tile.webpbin0 -> 8916 bytes
-rw-r--r--test/miscellaneous/image.cpp8
2 files changed, 8 insertions, 0 deletions
diff --git a/test/fixtures/image/tile.webp b/test/fixtures/image/tile.webp
new file mode 100644
index 0000000000..5dbad8f88d
--- /dev/null
+++ b/test/fixtures/image/tile.webp
Binary files differ
diff --git a/test/miscellaneous/image.cpp b/test/miscellaneous/image.cpp
index 2db62b96d3..9886eede45 100644
--- a/test/miscellaneous/image.cpp
+++ b/test/miscellaneous/image.cpp
@@ -78,6 +78,14 @@ TEST(Image, JPEGTile) {
EXPECT_EQ(256, image.height);
}
+#if !defined(__ANDROID__) && !defined(__APPLE__)
+TEST(Image, WebPTile) {
+ PremultipliedImage image = decodeImage(util::read_file("test/fixtures/image/tile.webp"));
+ EXPECT_EQ(256, image.width);
+ EXPECT_EQ(256, image.height);
+}
+#endif // !defined(__ANDROID__) && !defined(__APPLE__)
+
TEST(Image, Premultiply) {
UnassociatedImage rgba { 1, 1 };
rgba.data[0] = 255;