From db111197ac436ace0c3aceb88a6d7c1abca03b02 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Fri, 14 Apr 2006 17:29:19 -0700 Subject: Fix _cairo_surface_is_opaque to return FALSE not TRUE for non-image surfaces. --- src/cairo-surface.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/cairo-surface.c b/src/cairo-surface.c index 5af49da5d..9a15db4f6 100644 --- a/src/cairo-surface.c +++ b/src/cairo-surface.c @@ -1710,6 +1710,14 @@ _format_is_opaque (cairo_format_t format) return FALSE; } +/* XXX: This function is funny in a couple of ways. First it seems to + * be computing something like "not translucent" rather than "opaque" + * since it returns TRUE for an A1 image surface. Second, it just + * gives up on anything other than an image surface. + * + * I imagine something that might be more useful here (or in addition) + * would be cairo_surface_get_content. + */ cairo_bool_t _cairo_surface_is_opaque (const cairo_surface_t *surface) { @@ -1719,5 +1727,5 @@ _cairo_surface_is_opaque (const cairo_surface_t *surface) return _format_is_opaque (image_surface->format); } - return TRUE; + return FALSE; } -- cgit v1.2.3