[cairo] cairo_xlib_surface_set_drawable
Carl Worth
cworth at cworth.org
Sat Jul 9 18:03:29 PDT 2005
Quick responses to the questions in the patch, (recognizing that one
is likely a copy of a pre-existing question in the implementation):
On Sat, 09 Jul 2005 17:11:36 -0700, Keith Packard wrote:
> + /* XXX: How do we want to handle this error case? */
> + if (! _cairo_surface_is_xlib (abstract_surface))
> + return;
We've got CAIRO_STATUS_SURFACE_TYPE_MISMATCH for this case. We just
don't yet have the same error-handling scheme for cairo_surface_t that
we have for cairo_t, cairo_path_t, and cairo_pattern_t. When we add
that, we'll have a natural place to lodge the error.
> + /* XXX: and what about this case? */
> + if (surface->owns_pixmap)
> + return;
I think this is a surface-type mismatch as well. The owns_pixmap case
only shows up from "create_similar" which exists to allow the user to
create a surface of an unknown type. So it's quite legitimate to have
the use of a similar surface cause an type mismatch error for any
surface-type-specific functions like this one.
Since we don't yet have cairo_surface_get_status I think the handling
of these errors as above is just fine for now.
-Carl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20050709/70a2e538/attachment.pgp
More information about the cairo
mailing list