summaryrefslogtreecommitdiff
path: root/util/cairo-sphinx
diff options
context:
space:
mode:
authorM Joonas Pihlaja <jpihlaja@cc.helsinki.fi>2010-02-28 23:31:06 +0200
committerM Joonas Pihlaja <jpihlaja@cc.helsinki.fi>2010-03-01 01:21:31 +0200
commit5b7f4bb241f3191c1589cd714f373719efded56e (patch)
tree6eb5cf59bb1b3ac50304dc1a4465450e83e06517 /util/cairo-sphinx
parent620cd9c2be4a6bef790e6818652470a5c53d578d (diff)
downloadcairo-5b7f4bb241f3191c1589cd714f373719efded56e.tar.gz
api: Introduce CAIRO_FORMAT_INVALID formally in the API.
We were exposing the actual value of CAIRO_FORMAT_INVALID through API functions already, so it makes sense to just go ahead and put it in the cairo_format_t enum.
Diffstat (limited to 'util/cairo-sphinx')
-rw-r--r--util/cairo-sphinx/sphinx.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/util/cairo-sphinx/sphinx.c b/util/cairo-sphinx/sphinx.c
index 6d2cda700..20d9f01b4 100644
--- a/util/cairo-sphinx/sphinx.c
+++ b/util/cairo-sphinx/sphinx.c
@@ -618,6 +618,9 @@ compare_images (cairo_surface_t *a,
bb += stride;
}
break;
+
+ case CAIRO_FORMAT_INVALID:
+ break;
}
return TRUE;
@@ -831,7 +834,7 @@ request_image (struct client *c,
unsigned long offset = -1;
int len;
- assert (format != (cairo_format_t) -1);
+ assert (format != CAIRO_FORMAT_INVALID);
len = sprintf (buf, ".image %lu %d %d %d %d\n",
closure->id, format, width, height, stride);
@@ -900,14 +903,14 @@ send_surface (struct client *c,
{
cairo_surface_t *source = closure->surface;
cairo_surface_t *image;
- cairo_format_t format = (cairo_format_t) -1;
+ cairo_format_t format = CAIRO_FORMAT_INVALID;
cairo_t *cr;
int width, height, stride;
void *data;
unsigned long serial;
get_surface_size (source, &width, &height, &format);
- if (format == (cairo_format_t) -1)
+ if (format == CAIRO_FORMAT_INVALID)
format = format_for_content (cairo_surface_get_content (source));
stride = cairo_format_stride_for_width (format, width);