[cairo-commit] src/cairo-surface.c
Carl Worth
cworth at kemper.freedesktop.org
Fri Apr 14 17:55:34 PDT 2006
src/cairo-surface.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletion(-)
New commits:
diff-tree db111197ac436ace0c3aceb88a6d7c1abca03b02 (from e890bfd2bf04a973ead9f5d53d06728165faa28d)
Author: Carl Worth <cworth at cworth.org>
Date: Fri Apr 14 17:29:19 2006 -0700
Fix _cairo_surface_is_opaque to return FALSE not TRUE for non-image surfaces.
diff --git a/src/cairo-surface.c b/src/cairo-surface.c
index 5af49da..9a15db4 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_su
return _format_is_opaque (image_surface->format);
}
- return TRUE;
+ return FALSE;
}
More information about the cairo-commit
mailing list