[cairo-commit] 2 commits - src/cairo-surface.c test/any2ppm.c

Benjamin Otte company at kemper.freedesktop.org
Fri Feb 18 09:53:56 PST 2011


 src/cairo-surface.c |    4 ++++
 test/any2ppm.c      |    1 +
 2 files changed, 5 insertions(+)

New commits:
commit 9dcd29bef48071fcc28f5fa93d6369dfc1eed3da
Author: Benjamin Otte <otte at redhat.com>
Date:   Fri Feb 18 18:53:29 2011 +0100

    test: Add missing format to any2ppm to silence gcc

diff --git a/test/any2ppm.c b/test/any2ppm.c
index b4c9de6..40c304b 100644
--- a/test/any2ppm.c
+++ b/test/any2ppm.c
@@ -191,6 +191,7 @@ write_ppm (cairo_surface_t *surface, int fd)
 	format_str = "P5";
 	break;
     case CAIRO_FORMAT_A1:
+    case CAIRO_FORMAT_RGB16_565:
     case CAIRO_FORMAT_INVALID:
     default:
 	return "unhandled image format";
commit 056250775f15ea8fd337e3f37d6906f01b8c09a6
Author: Benjamin Otte <otte at redhat.com>
Date:   Fri Feb 18 18:52:11 2011 +0100

    surface: Allow NOTHING_TO_DO as a valid error for now
    
    Lots of code relies on it, so we'd better not break that immediately. ;)

diff --git a/src/cairo-surface.c b/src/cairo-surface.c
index 4c6dc76..3ba36f6 100644
--- a/src/cairo-surface.c
+++ b/src/cairo-surface.c
@@ -169,6 +169,10 @@ cairo_status_t
 _cairo_surface_set_error (cairo_surface_t *surface,
 			  cairo_status_t status)
 {
+    if (status == CAIRO_STATUS_SUCCESS ||
+        status == CAIRO_INT_STATUS_NOTHING_TO_DO)
+        return;
+
     /* Don't overwrite an existing error. This preserves the first
      * error, which is the most significant. */
     _cairo_status_set_error (&surface->status, status);


More information about the cairo-commit mailing list