[cairo-bugs] [Bug 50413] New: [patch] add explaination to _cairo_surface_create_in_error, improving code readability

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon May 28 01:01:53 PDT 2012


https://bugs.freedesktop.org/show_bug.cgi?id=50413

             Bug #: 50413
           Summary: [patch] add explaination to
                    _cairo_surface_create_in_error, improving code
                    readability
    Classification: Unclassified
           Product: cairo
           Version: 1.12.2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: general
        AssignedTo: cworth at cworth.org
        ReportedBy: dongsheng.xing at intel.com
         QAContact: cairo-bugs at cairographics.org


diff --git a/src/cairo-surface.c b/src/cairo-surface.c
index 8a7cbb0..fadee8d 100644
--- a/src/cairo-surface.c
+++ b/src/cairo-surface.c
@@ -2489,6 +2489,16 @@ _cairo_surface_set_resolution (cairo_surface_t *surface,
     surface->y_resolution = y_res;
 }

+/**
+ * _cairo_surface_create_in_error:
+ * @status: the error status
+ *
+ * Return an appropriate static error surface for the error status.
+ * On error, surface creation functions should always return a surface
+ * created with _cairo_surface_create_in_error() instead of a new surface
+ * in an error state. This simplifies internal code as no refcounting has
+ * to be done.
+ **/
 cairo_surface_t *
 _cairo_surface_create_in_error (cairo_status_t status)
 {

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.


More information about the cairo-bugs mailing list