static cairo_status_t _cairo_truetype_font_set_error (cairo_truetype_font_t *font, cairo_status_t status) { if (status == CAIRO_STATUS_SUCCESS || status == CAIRO_INT_STATUS_UNSUPPORTED) return status; _cairo_status_set_error (&font->status, status); return _cairo_error (status); }
/** * _cairo_region_set_error: * @region: a region * @status: a status value indicating an error * * Atomically sets region->status to @status and calls _cairo_error; * Does nothing if status is %CAIRO_STATUS_SUCCESS or any of the internal * status values. * * All assignments of an error status to region->status should happen * through _cairo_region_set_error(). Note that due to the nature of * the atomic operation, it is not safe to call this function on the * nil objects. * * The purpose of this function is to allow the user to set a * breakpoint in _cairo_error() to generate a stack trace for when the * user causes cairo to detect an error. * * Return value: the error status. **/ static cairo_status_t _cairo_region_set_error (cairo_region_t *region, cairo_status_t status) { if (status == CAIRO_STATUS_SUCCESS) return CAIRO_STATUS_SUCCESS; /* Don't overwrite an existing error. This preserves the first * error, which is the most significant. */ _cairo_status_set_error (®ion->status, status); return _cairo_error (status); }
/** * _cairo_region_set_error: * @region: a region * @status: a status value indicating an error * * Atomically sets region->status to @status and calls _cairo_error; * Does nothing if status is %CAIRO_STATUS_SUCCESS or any of the internal * status values. * * All assignments of an error status to region->status should happen * through _cairo_region_set_error(). Note that due to the nature of * the atomic operation, it is not safe to call this function on the * nil objects. * * The purpose of this function is to allow the user to set a * breakpoint in _cairo_error() to generate a stack trace for when the * user causes cairo to detect an error. * * Return value: the error status. **/ static cairo_status_t _cairo_region_set_error (cairo_region_t *region, cairo_status_t status) { if (! _cairo_status_is_error (status)) return status; /* Don't overwrite an existing error. This preserves the first * error, which is the most significant. */ _cairo_status_set_error (®ion->status, status); return _cairo_error (status); }
cairo_status_t _cairo_font_face_set_error (cairo_font_face_t *font_face, cairo_status_t status) { if (status == CAIRO_STATUS_SUCCESS) return status; /* Don't overwrite an existing error. This preserves the first * error, which is the most significant. */ _cairo_status_set_error (&font_face->status, status); return _cairo_error (status); }
void cairo_drm_device_throttle (cairo_drm_device_t *dev) { cairo_status_t status; if (unlikely (dev->status)) return; if (dev->device.throttle == NULL) return; status = dev->device.throttle (dev); if (unlikely (status)) _cairo_status_set_error (&dev->status, status); }