summaryrefslogtreecommitdiff
path: root/src/cairo-surface.c
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2006-06-15 15:33:45 -0700
committerCarl Worth <cworth@cworth.org>2006-06-15 15:33:45 -0700
commit9fa24975b4b9cc9983331991d2a3c53a37272162 (patch)
tree89791c0c733549c7cd6e5e8584f1637576f74a28 /src/cairo-surface.c
parent0ba040d7f63c62e482d40fc6db0e1f0714806839 (diff)
Drop _cairo_surface_is_opaque now that we have cairo_surface_get_content
Diffstat (limited to 'src/cairo-surface.c')
-rw-r--r--src/cairo-surface.c37
1 files changed, 1 insertions, 36 deletions
diff --git a/src/cairo-surface.c b/src/cairo-surface.c
index 3218607e1..b7d0e75f2 100644
--- a/src/cairo-surface.c
+++ b/src/cairo-surface.c
@@ -170,6 +170,7 @@ cairo_surface_get_content (cairo_surface_t *surface)
{
return surface->content;
}
+slim_hidden_def(cairo_surface_get_content);
/**
* cairo_surface_status:
@@ -2002,42 +2003,6 @@ _cairo_surface_composite_shape_fixup_unbounded (cairo_surface_t *dst,
dst_x, dst_y, width, height);
}
-static cairo_bool_t
-_format_is_opaque (cairo_format_t format)
-{
- switch (format) {
- case CAIRO_FORMAT_ARGB32:
- return FALSE;
- case CAIRO_FORMAT_RGB24:
- return TRUE;
- case CAIRO_FORMAT_A8:
- return FALSE;
- case CAIRO_FORMAT_A1:
- return TRUE;
- }
- 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)
-{
- if (_cairo_surface_is_image (surface)) {
- const cairo_image_surface_t *image_surface = (cairo_image_surface_t *) surface;
-
- return _format_is_opaque (image_surface->format);
- }
-
- return FALSE;
-}
-
/**
* _cairo_surface_copy_pattern_for_destination
* @pattern: the pattern to copy