diff options
author | Vincent Sanders <vince@kyllikki.org> | 2020-05-13 19:03:14 +0100 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2020-05-13 19:03:14 +0100 |
commit | 3a7fc30a5f1c0945c021abf185274e88f72e7080 (patch) | |
tree | 2bb5252d22b799cc01ef1ee1858fdcb5473095bf /content/handlers/image/bmp.c | |
parent | 95e0a24fac2abc4cddaa91bf44304ebc3d776b17 (diff) | |
download | netsurf-3a7fc30a5f1c0945c021abf185274e88f72e7080.tar.gz netsurf-3a7fc30a5f1c0945c021abf185274e88f72e7080.tar.bz2 |
implement content opacity check through the function table
Diffstat (limited to 'content/handlers/image/bmp.c')
-rw-r--r-- | content/handlers/image/bmp.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/content/handlers/image/bmp.c b/content/handlers/image/bmp.c index a1a6ce686..a723022fe 100644 --- a/content/handlers/image/bmp.c +++ b/content/handlers/image/bmp.c @@ -264,6 +264,16 @@ static content_type nsbmp_content_type(void) return CONTENT_IMAGE; } +static bool nsbmp_content_is_opaque(struct content *c) +{ + nsbmp_content *bmp = (nsbmp_content *)c; + + if (bmp->bitmap != NULL) { + return guit->bitmap->get_opaque(bmp->bitmap); + } + + return false; +} static const content_handler nsbmp_content_handler = { .create = nsbmp_create, @@ -273,6 +283,7 @@ static const content_handler nsbmp_content_handler = { .clone = nsbmp_clone, .get_internal = nsbmp_get_internal, .type = nsbmp_content_type, + .is_opaque = nsbmp_content_is_opaque, .no_share = false, }; |