[cairo] Is it an error in cairo-surface.c

oken okenjian at 163.com
Thu Sep 30 00:12:21 PDT 2010


VERISON:cairo 1.11.1

cairo_status_t
_cairo_surface_fill_rectangles (cairo_surface_t  *surface,
    cairo_operator_t         op,
    const cairo_color_t *color,
    cairo_rectangle_int_t *rects,
    int    num_rects)
{
    cairo_int_status_t status;
    if (surface->status)
 return surface->status;
    assert (! surface->is_snapshot);
    if (surface->finished)
 return _cairo_surface_set_error (surface,CAIRO_STATUS_SURFACE_FINISHED);
    if (num_rects == 0)
 return CAIRO_STATUS_SUCCESS;
    if (surface->backend->fill_rectangles) {
 status = surface->backend->fill_rectangles (surface, op, color,
          rects, num_rects);
 if (status != CAIRO_INT_STATUS_UNSUPPORTED)
     return _cairo_surface_set_error (surface, status);
    }
    return _cairo_surface_set_error (surface,
     _cairo_surface_fallback_fill_rectangles (surface, op, color,
           rects, num_rects));
}

In my opinion,
 if (status != CAIRO_INT_STATUS_UNSUPPORTED)
     return _cairo_surface_set_error (surface, status);
should be 
 if (status && status != CAIRO_INT_STATUS_UNSUPPORTED)
     return _cairo_surface_set_error (surface, status);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo/attachments/20100930/fcb9e4a8/attachment.html>


More information about the cairo mailing list