summaryrefslogtreecommitdiff
path: root/image/src
diff options
context:
space:
mode:
authorPale Moon <git-repo@palemoon.org>2015-06-16 19:22:15 +0200
committerPale Moon <git-repo@palemoon.org>2015-06-16 19:22:15 +0200
commit56b9630c07344b3838ec134c60ebd6997ca51227 (patch)
treea0eac7a8e23e08ccf4d7ab8c72ec9d516af7987f /image/src
parent870503e80d89d11c298c2799661fac01a211b249 (diff)
downloadpalemoon-gre-56b9630c07344b3838ec134c60ebd6997ca51227.tar.gz
Import libwebp 0.3.0 to the tree
Diffstat (limited to 'image/src')
-rw-r--r--image/src/Image.cpp4
-rw-r--r--image/src/Image.h3
-rw-r--r--image/src/RasterImage.cpp4
3 files changed, 10 insertions, 1 deletions
diff --git a/image/src/Image.cpp b/image/src/Image.cpp
index dbfd85d75..119c6b919 100644
--- a/image/src/Image.cpp
+++ b/image/src/Image.cpp
@@ -69,6 +69,10 @@ Image::GetDecoderType(const char *aMimeType)
else if (!strcmp(aMimeType, IMAGE_JPG))
rv = eDecoderType_jpeg;
+ // WEBP
+ else if (!strcmp(aMimeType, IMAGE_WEBP))
+ rv = eDecoderType_webp;
+
// BMP
else if (!strcmp(aMimeType, IMAGE_BMP))
rv = eDecoderType_bmp;
diff --git a/image/src/Image.h b/image/src/Image.h
index bf0b078d6..a020b713b 100644
--- a/image/src/Image.h
+++ b/image/src/Image.h
@@ -27,7 +27,8 @@ public:
eDecoderType_ico = 4,
eDecoderType_icon = 5,
eDecoderType_wbmp = 6,
- eDecoderType_unknown = 7
+ eDecoderType_webp = 7,
+ eDecoderType_unknown = 8
};
static eDecoderType GetDecoderType(const char *aMimeType);
diff --git a/image/src/RasterImage.cpp b/image/src/RasterImage.cpp
index 30acb09a3..a99da693f 100644
--- a/image/src/RasterImage.cpp
+++ b/image/src/RasterImage.cpp
@@ -31,6 +31,7 @@
#include "nsBMPDecoder.h"
#include "nsICODecoder.h"
#include "nsIconDecoder.h"
+#include "nsWEBPDecoder.h"
#ifdef MOZ_WBMP
#include "nsWBMPDecoder.h"
@@ -2139,6 +2140,9 @@ RasterImage::InitDecoder(bool aDoSizeDecode)
case eDecoderType_icon:
mDecoder = new nsIconDecoder(*this);
break;
+ case eDecoderType_webp:
+ mDecoder = new nsWEBPDecoder(*this);
+ break;
#ifdef MOZ_WBMP
case eDecoderType_wbmp:
mDecoder = new nsWBMPDecoder(*this);