diff options
Diffstat (limited to 'content')
-rw-r--r-- | content/content.c | 14 | ||||
-rw-r--r-- | content/content_protected.h | 6 | ||||
-rw-r--r-- | content/content_type.h | 3 |
3 files changed, 23 insertions, 0 deletions
diff --git a/content/content.c b/content/content.c index 5165c6b50..9a8336287 100644 --- a/content/content.c +++ b/content/content.c @@ -77,6 +77,9 @@ #ifdef WITH_PNG #include "image/png.h" #endif +#ifdef WITH_WEBP +#include "image/webp.h" +#endif #include "utils/http.h" #include "utils/log.h" #include "utils/messages.h" @@ -153,6 +156,9 @@ static const struct mime_entry mime_map[] = { #ifdef WITH_BMP {"image/vnd.microsoft.icon", CONTENT_ICO}, #endif +#ifdef WITH_WEBP + {"image/webp", CONTENT_WEBP}, +#endif #ifdef WITH_ARTWORKS {"image/x-artworks", CONTENT_ARTWORKS}, #endif @@ -231,6 +237,9 @@ const char * const content_type_name[] = { #if defined(WITH_NS_SVG) || defined(WITH_RSVG) "SVG", #endif +#ifdef WITH_WEBP + "WEBP", +#endif "OTHER", "UNKNOWN" }; @@ -360,6 +369,11 @@ static const struct handler_entry handler_map[] = { 0, rsvg_destroy, 0, 0, 0, rsvg_redraw, 0, 0, 0, rsvg_clone, false}, #endif +#ifdef WITH_WEBP + {0, 0, webp_convert, + 0, webp_destroy, 0, 0, 0, webp_redraw, 0, + 0, 0, webp_clone, false}, +#endif {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, false} }; #define HANDLER_MAP_COUNT (sizeof(handler_map) / sizeof(handler_map[0])) diff --git a/content/content_protected.h b/content/content_protected.h index c46fa6c6c..6d8d50dc7 100644 --- a/content/content_protected.h +++ b/content/content_protected.h @@ -75,6 +75,9 @@ #ifdef WITH_RSVG #include "image/rsvg.h" #endif +#ifdef WITH_WEBP +#include "image/webp.h" +#endif struct bitmap; @@ -147,6 +150,9 @@ struct content { #ifdef WITH_PNG struct content_png_data png; #endif +#ifdef WITH_WEBP + struct content_webp_data webp; +#endif } data; /**< URL for refresh request, in standard form as from url_join. */ diff --git a/content/content_type.h b/content/content_type.h index 23cdc6203..bcb2cc170 100644 --- a/content/content_type.h +++ b/content/content_type.h @@ -68,6 +68,9 @@ typedef enum { #if defined(WITH_NS_SVG) || defined(WITH_RSVG) CONTENT_SVG, #endif +#ifdef WITH_WEBP + CONTENT_WEBP, +#endif /* these must be the last two */ CONTENT_OTHER, CONTENT_UNKNOWN /**< content-type not received yet */ |