summaryrefslogtreecommitdiff
path: root/content/handlers/image/gif.c
diff options
context:
space:
mode:
Diffstat (limited to 'content/handlers/image/gif.c')
-rw-r--r--content/handlers/image/gif.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/content/handlers/image/gif.c b/content/handlers/image/gif.c
index 6ef4fa7e7..e2a0ca5db 100644
--- a/content/handlers/image/gif.c
+++ b/content/handlers/image/gif.c
@@ -416,6 +416,19 @@ static content_type nsgif_content_type(void)
return CONTENT_IMAGE;
}
+static bool nsgif_content_is_opaque(struct content *c)
+{
+ nsgif_content *gif = (nsgif_content *) c;
+
+ if (gif->current_frame != gif->gif->decoded_frame) {
+ if (nsgif_get_frame(gif) != GIF_OK) {
+ return false;
+ }
+ }
+
+ return guit->bitmap->get_opaque(gif->gif->frame_image);
+}
+
static const content_handler nsgif_content_handler = {
.create = nsgif_create,
.data_complete = nsgif_convert,
@@ -426,6 +439,7 @@ static const content_handler nsgif_content_handler = {
.remove_user = nsgif_remove_user,
.get_internal = nsgif_get_internal,
.type = nsgif_content_type,
+ .is_opaque = nsgif_content_is_opaque,
.no_share = false,
};