From 3a7fc30a5f1c0945c021abf185274e88f72e7080 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Wed, 13 May 2020 19:03:14 +0100 Subject: implement content opacity check through the function table --- content/handlers/image/rsvg.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'content/handlers/image/rsvg.c') diff --git a/content/handlers/image/rsvg.c b/content/handlers/image/rsvg.c index 5cf900dac..0051df38f 100644 --- a/content/handlers/image/rsvg.c +++ b/content/handlers/image/rsvg.c @@ -316,6 +316,19 @@ static content_type rsvg_content_type(void) return CONTENT_IMAGE; } + +static bool rsvg_content_is_opaque(struct content *c) +{ + rsvg_content *d = (rsvg_content *) c; + + if (d->bitmap != NULL) { + return guit->bitmap->get_opaque(d->bitmap); + } + + return false; +} + + static const content_handler rsvg_content_handler = { .create = rsvg_create, .process_data = rsvg_process_data, @@ -325,6 +338,7 @@ static const content_handler rsvg_content_handler = { .clone = rsvg_clone, .get_internal = rsvg_get_internal, .type = rsvg_content_type, + .is_opaque = rsvg_content_is_opaque, .no_share = false, }; -- cgit v1.2.3