mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-04 23:28:07 +02:00
Fix _cairo_surface_is_opaque to return FALSE not TRUE for non-image surfaces.
This commit is contained in:
parent
e890bfd2bf
commit
db111197ac
1 changed files with 9 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue