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/content.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/content.c')
-rw-r--r-- | content/content.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/content/content.c b/content/content.c index bc3f48429..f72f3d434 100644 --- a/content/content.c +++ b/content/content.c @@ -33,7 +33,6 @@ #include "netsurf/bitmap.h" #include "netsurf/content.h" #include "desktop/knockout.h" -#include "desktop/gui_internal.h" #include "content/content_protected.h" #include "content/textsearch.h" @@ -1294,21 +1293,13 @@ bool content_get_opaque(hlcache_handle *h) /* exported interface documented in content/content_protected.h */ bool content__get_opaque(struct content *c) { - bool opaque = false; - if ((c != NULL) && (c->handler != NULL) && - (c->handler->type != NULL) && - (c->handler->type() == CONTENT_IMAGE) && - (c->handler->get_internal != NULL) ) { - struct bitmap *bitmap = NULL; - bitmap = c->handler->get_internal(c, NULL); - if (bitmap != NULL) { - opaque = guit->bitmap->get_opaque(bitmap); - } + (c->handler->is_opaque != NULL)) { + return c->handler->is_opaque(c); } - return opaque; + return false; } |