summaryrefslogtreecommitdiff
path: root/image
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2011-05-09 08:15:38 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2011-05-09 08:15:38 +0000
commit41d2df4f5c5635d076bfbe0d0bc7a1e1998d066c (patch)
treed1f1a54c5fd0c22dd70172f8544fa43da1bbbe0d /image
parent8bb723a74600ae7ad328e2587548a216db880ee2 (diff)
downloadnetsurf-41d2df4f5c5635d076bfbe0d0bc7a1e1998d066c.tar.gz
netsurf-41d2df4f5c5635d076bfbe0d0bc7a1e1998d066c.tar.bz2
Untested fix and tile implementation for webp.
svn path=/trunk/netsurf/; revision=12328
Diffstat (limited to 'image')
-rw-r--r--image/webp.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/image/webp.c b/image/webp.c
index a76c0918c..7b651a1c7 100644
--- a/image/webp.c
+++ b/image/webp.c
@@ -49,7 +49,8 @@ static bool webp_convert(struct content *c);
static void webp_destroy(struct content *c);
static bool webp_redraw(struct content *c, int x, int y,
int width, int height, const struct rect *clip,
- float scale, colour background_colour);
+ float scale, colour background_colour,
+ bool repeat_x, bool repeat_y);
static nserror webp_clone(const struct content *old, struct content **newc);
static content_type webp_content_type(lwc_string *mime_type);
@@ -65,7 +66,6 @@ static const content_handler webp_content_handler = {
webp_redraw,
NULL,
NULL,
- NULL,
webp_clone,
NULL,
webp_content_type,
@@ -223,10 +223,18 @@ void webp_destroy(struct content *c)
bool webp_redraw(struct content *c, int x, int y,
int width, int height, const struct rect *clip,
- float scale, colour background_colour)
+ float scale, colour background_colour,
+ bool repeat_x, bool repeat_y)
{
+ bitmap_flags_t flags = BITMAPF_NONE;
+
+ if (repeat_x)
+ flags |= BITMAPF_REPEAT_X;
+ if (repeat_y)
+ flags |= BITMAPF_REPEAT_Y;
+
return plot.bitmap(x, y, width, height,
- c->bitmap, background_colour, BITMAPF_NONE);
+ c->bitmap, background_colour, flags);
}