This repository was archived by the owner on Jun 8, 2021. It is now read-only.

Description
Cairo's surface creation functions can return errors in the form of a valid cairo_surface_t* but whose cairo_surface_status(surf) != CAIRO_STATUS_SUCCESS.
For example, cairo_image_surface_create() can return CAIRO_STATUS_INVALID_SIZE if the passed size is greater than what Pixman supports, or it can return CAIRO_STATUS_NO_MEMORY if allocation fails.
Cairo-rs similarly returns a valid Surface (or ImageSurface) whose status must be checked before proceeding.
Should we return a Result<Surface, Status> (or the corresponding Result<ImageSurface, Status>) instead?