[cairo-commit] cairo/src cairo-font.c, 1.49, 1.50 cairo-ft-font.c,
1.63, 1.64 cairo-glitz-surface.c, 1.43, 1.44 cairo-gstate.c,
1.138, 1.139 cairo-image-surface.c, 1.43, 1.44 cairo-pattern.c,
1.41, 1.42 cairo-pdf-surface.c, 1.42, 1.43 cairo-png.c, 1.13,
1.14 cairo-surface.c, 1.71, 1.72 cairo-win32-font.c, 1.20,
1.21 cairo-win32-surface.c, 1.23, 1.24 cairo-xcb-surface.c,
1.32, 1.33 cairo-xlib-surface.c, 1.75, 1.76 cairoint.h, 1.148, 1.149
Carl Worth
commit at pdx.freedesktop.org
Fri Jun 10 12:18:24 PDT 2005
Committed by: cworth
Update of /cvs/cairo/cairo/src
In directory gabe:/tmp/cvs-serv25643/src
Modified Files:
cairo-font.c cairo-ft-font.c cairo-glitz-surface.c
cairo-gstate.c cairo-image-surface.c cairo-pattern.c
cairo-pdf-surface.c cairo-png.c cairo-surface.c
cairo-win32-font.c cairo-win32-surface.c cairo-xcb-surface.c
cairo-xlib-surface.c cairoint.h
Log Message:
* src/cairoint.h:
* src/cairo-font.c:
* src/cairo-ft-font.c:
* src/cairo-glitz-surface.c:
* src/cairo-gstate.c:
* src/cairo-image-surface.c:
* src/cairo-pattern.c:
* src/cairo-pdf-surface.c:
* src/cairo-png.c:
* src/cairo-surface.c:
* src/cairo-win32-font.c:
* src/cairo-win32-surface.c:
* src/cairo-xcb-surface.c:
* src/cairo-xlib-surface.c: Remove STATUS_OK macro which was not
being used universally.
Index: cairo-font.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo-font.c,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -d -r1.49 -r1.50
--- cairo-font.c 3 Jun 2005 23:45:47 -0000 1.49
+++ cairo-font.c 10 Jun 2005 19:18:21 -0000 1.50
@@ -405,7 +405,7 @@
return NULL;
}
status = _cairo_cache_lookup (cache, &key, (void **) &entry, &created_entry);
- if (STATUS_OK (status) && !created_entry)
+ if (status == CAIRO_STATUS_SUCCESS && !created_entry)
cairo_font_face_reference (&entry->font_face->base);
_unlock_global_simple_cache ();
@@ -596,7 +596,7 @@
}
status = _cairo_cache_lookup (cache, key, (void **) &inner_entry, &created_entry);
- if (!STATUS_OK (status)) {
+ if (status) {
free (entry);
return status;
}
@@ -646,7 +646,7 @@
k->font_matrix,
k->ctm,
&entry->scaled_font);
- if (!STATUS_OK (status)) {
+ if (status) {
free (entry);
return status;
}
@@ -737,11 +737,11 @@
}
status = _cairo_cache_lookup (cache, &key, (void **) &entry, NULL);
- if (STATUS_OK (status))
+ if (status == CAIRO_STATUS_SUCCESS)
cairo_scaled_font_reference (entry->scaled_font);
_unlock_global_font_cache ();
- if (!STATUS_OK (status))
+ if (status)
return NULL;
return entry->scaled_font;
@@ -958,7 +958,7 @@
status = _cairo_scaled_font_font_extents (scaled_font, extents);
- if (!STATUS_OK (status))
+ if (status)
return status;
_cairo_matrix_compute_scale_factors (&scaled_font->font_matrix,
Index: cairo-ft-font.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo-ft-font.c,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -d -r1.63 -r1.64
--- cairo-ft-font.c 3 Jun 2005 23:45:47 -0000 1.63
+++ cairo-ft-font.c 10 Jun 2005 19:18:21 -0000 1.64
@@ -338,11 +338,11 @@
}
status = _cairo_cache_lookup (cache, &key, (void **) &entry, &created_entry);
- if (STATUS_OK (status) && !created_entry)
+ if (status == CAIRO_STATUS_SUCCESS && !created_entry)
_cairo_unscaled_font_reference (&entry->unscaled->base);
_unlock_global_ft_cache ();
- if (!STATUS_OK (status))
+ if (status)
return NULL;
return entry->unscaled;
@@ -866,7 +866,7 @@
_cairo_ft_scaled_font_get_glyph_cache_key (scaled_font, &key);
status = _cairo_utf8_to_ucs4 ((unsigned char*)utf8, -1, &ucs4, num_glyphs);
- if (!STATUS_OK (status))
+ if (status)
return status;
face = cairo_ft_scaled_font_lock_face (&scaled_font->base);
Index: cairo-glitz-surface.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo-glitz-surface.c,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -d -r1.43 -r1.44
--- cairo-glitz-surface.c 3 Jun 2005 23:45:47 -0000 1.43
+++ cairo-glitz-surface.c 10 Jun 2005 19:18:21 -0000 1.44
@@ -1390,6 +1390,8 @@
cairo_bool_t kick_out,
void *closure)
{
+ cairo_status_t status;
+
if (area->width < width || area->height < height)
return CAIRO_INT_STATUS_UNSUPPORTED;
@@ -1450,9 +1452,10 @@
area->state = CAIRO_GLITZ_AREA_DIVIDED;
- if (STATUS_OK (_cairo_glitz_area_find (area->area[0],
- width, height,
- kick_out, closure)))
+ status = _cairo_glitz_area_find (area->area[0],
+ width, height,
+ kick_out, closure);
+ if (status == CAIRO_STATUS_SUCCESS)
return CAIRO_STATUS_SUCCESS;
}
} break;
@@ -1467,9 +1470,10 @@
if (area->area[i]->width >= width &&
area->area[i]->height >= height)
{
- if (STATUS_OK (_cairo_glitz_area_find (area->area[i],
- width, height,
- kick_out, closure)))
+ status = _cairo_glitz_area_find (area->area[i],
+ width, height,
+ kick_out, closure);
+ if (status == CAIRO_STATUS_SUCCESS)
return CAIRO_STATUS_SUCCESS;
rejected = TRUE;
@@ -1502,8 +1506,10 @@
area->closure = NULL;
area->state = CAIRO_GLITZ_AREA_AVAILABLE;
- if (STATUS_OK (_cairo_glitz_area_find (area, width, height,
- TRUE, closure)))
+
+ status = _cairo_glitz_area_find (area, width, height,
+ TRUE, closure);
+ if (status == CAIRO_STATUS_SUCCESS)
return CAIRO_STATUS_SUCCESS;
} break;
Index: cairo-gstate.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo-gstate.c,v
retrieving revision 1.138
retrieving revision 1.139
diff -u -d -r1.138 -r1.139
--- cairo-gstate.c 3 Jun 2005 23:40:16 -0000 1.138
+++ cairo-gstate.c 10 Jun 2005 19:18:21 -0000 1.139
@@ -345,7 +345,7 @@
cairo_status_t status;
status = _cairo_surface_get_extents (gstate->target, rectangle);
- if (!STATUS_OK(status))
+ if (status)
return status;
/* check path extents here */
@@ -714,11 +714,11 @@
cairo_traps_t traps;
status = _cairo_gstate_set_clip (gstate);
- if (!STATUS_OK (status))
+ if (status)
return status;
status = _cairo_gstate_get_clip_extents (gstate, &rectangle);
- if (!STATUS_OK (status))
+ if (status)
return status;
box.p1.x = _cairo_fixed_from_int (rectangle.x);
@@ -726,7 +726,7 @@
box.p2.x = _cairo_fixed_from_int (rectangle.x + rectangle.width);
box.p2.y = _cairo_fixed_from_int (rectangle.y + rectangle.height);
status = _cairo_traps_init_box (&traps, &box);
- if (!STATUS_OK (status))
+ if (status)
return status;
_cairo_gstate_clip_and_composite_trapezoids (gstate,
@@ -814,7 +814,7 @@
cairo_status_t status;
status = _region_new_from_rect (&gstate->clip.surface_rect, &clip_rect);
- if (!STATUS_OK (status))
+ if (status)
return status;
if (pixman_region_intersect (region,
@@ -824,7 +824,7 @@
pixman_region_destroy (clip_rect);
- if (!STATUS_OK (status))
+ if (status)
return status;
}
@@ -856,7 +856,7 @@
int mask_x, mask_y;
status = _cairo_gstate_set_clip (gstate);
- if (!STATUS_OK (status))
+ if (status)
return status;
_get_mask_extents (gstate, mask, &extents);
@@ -880,13 +880,13 @@
0, 0,
0, 0,
extents.width, extents.height);
- if (!STATUS_OK (status)) {
+ if (status) {
cairo_surface_destroy (intermediate);
return status;
}
status = _cairo_gstate_combine_clip_surface (gstate, intermediate, &extents);
- if (!STATUS_OK (status)) {
+ if (status) {
cairo_surface_destroy (intermediate);
return status;
}
@@ -931,7 +931,7 @@
return CAIRO_STATUS_SUCCESS;
status = _cairo_gstate_set_clip (gstate);
- if (!STATUS_OK (status))
+ if (status)
return status;
_cairo_pen_init (&gstate->pen_regular, gstate->line_width / 2.0, gstate);
@@ -1047,7 +1047,7 @@
cairo_status_t status;
status = _cairo_gstate_intersect_clip (gstate, trap_region);
- if (!STATUS_OK (status))
+ if (status)
return status;
_region_rect_extents (trap_region, extents);
@@ -1073,7 +1073,7 @@
cairo_status_t status;
status = _region_new_from_rect (extents, &intersection);
- if (!STATUS_OK (status))
+ if (status)
return status;
if (pixman_region_intersect (intersection,
@@ -1089,7 +1089,7 @@
pixman_region_destroy (intersection);
- if (!STATUS_OK (status))
+ if (status)
return status;
}
@@ -1121,14 +1121,14 @@
if (num_rects > 1) {
status = _cairo_surface_can_clip_region (gstate->target);
- if (!STATUS_OK (status))
+ if (status)
return status;
clip_serial = _cairo_surface_allocate_clip_serial (gstate->target);
status = _cairo_surface_set_clip_region (gstate->target,
trap_region,
clip_serial);
- if (!STATUS_OK (status))
+ if (status)
return status;
}
@@ -1225,11 +1225,11 @@
traps->num_traps);
_cairo_pattern_fini (&pattern.base);
- if (!STATUS_OK (status))
+ if (status)
goto out;
status = _cairo_gstate_combine_clip_surface (gstate, intermediate, extents);
- if (!STATUS_OK (status))
+ if (status)
goto out;
_cairo_pattern_init_for_surface (&intermediate_pattern, intermediate);
@@ -1343,7 +1343,7 @@
return CAIRO_STATUS_NO_TARGET_SURFACE;
status = _cairo_traps_extract_region (traps, &trap_region);
- if (!STATUS_OK (status))
+ if (status)
return status;
if (trap_region)
@@ -1351,7 +1351,7 @@
else
status = _clip_and_compute_extents_arbitrary (gstate, traps, &extents);
- if (!STATUS_OK (status))
+ if (status)
goto out;
if (_cairo_rectangle_empty (&extents))
@@ -1407,7 +1407,7 @@
cairo_traps_t traps;
status = _cairo_gstate_set_clip (gstate);
- if (!STATUS_OK (status))
+ if (status)
return status;
status = _cairo_surface_fill_path (gstate->operator,
@@ -1578,7 +1578,7 @@
_cairo_traps_init (&traps);
status = _cairo_path_fixed_fill_to_traps (path, gstate, &traps);
- if (!STATUS_OK (status)) {
+ if (status) {
_cairo_traps_fini (&traps);
return status;
}
@@ -1586,13 +1586,13 @@
status = _cairo_surface_can_clip_region (gstate->target);
if (status != CAIRO_INT_STATUS_UNSUPPORTED) {
- if (!STATUS_OK (status))
+ if (status)
return status;
/* Check to see if we can represent these traps as a PixRegion. */
status = _cairo_traps_extract_region (&traps, ®ion);
- if (!STATUS_OK (status)) {
+ if (status) {
_cairo_traps_fini (&traps);
return status;
}
@@ -1662,7 +1662,7 @@
_cairo_pattern_fini (&pattern.base);
_cairo_traps_fini (&traps);
- if (!STATUS_OK (status)) {
+ if (status) {
cairo_surface_destroy (surface);
return status;
}
@@ -1687,7 +1687,7 @@
_cairo_pattern_fini (&pattern.base);
- if (!STATUS_OK (status)) {
+ if (status) {
cairo_surface_destroy (surface);
return status;
}
@@ -1980,7 +1980,7 @@
cairo_rectangle_t extents;
status = _cairo_gstate_set_clip (gstate);
- if (!STATUS_OK (status))
+ if (status)
return status;
status = _cairo_gstate_ensure_font (gstate);
Index: cairo-image-surface.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo-image-surface.c,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -d -r1.43 -r1.44
--- cairo-image-surface.c 1 Jun 2005 20:24:10 -0000 1.43
+++ cairo-image-surface.c 10 Jun 2005 19:18:21 -0000 1.44
@@ -518,12 +518,12 @@
return status;
status = _cairo_image_surface_set_attributes (src, &src_attr);
- if (STATUS_OK (status))
+ if (status == CAIRO_STATUS_SUCCESS)
{
if (mask)
{
status = _cairo_image_surface_set_attributes (mask, &mask_attr);
- if (STATUS_OK (status))
+ if (status == CAIRO_STATUS_SUCCESS)
pixman_composite (_pixman_operator (operator),
src->pixman_image,
mask->pixman_image,
@@ -621,7 +621,7 @@
/* XXX: The pixman_trapezoid_t cast is evil and needs to go away
* somehow. */
status = _cairo_image_surface_set_attributes (src, &attributes);
- if (STATUS_OK (status))
+ if (status == CAIRO_STATUS_SUCCESS)
pixman_composite_trapezoids (_pixman_operator (operator),
src->pixman_image,
dst->pixman_image,
Index: cairo-pattern.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo-pattern.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -d -r1.41 -r1.42
--- cairo-pattern.c 3 Jun 2005 21:51:57 -0000 1.41
+++ cairo-pattern.c 10 Jun 2005 19:18:21 -0000 1.42
@@ -1039,7 +1039,7 @@
status = _cairo_surface_acquire_source_image (pattern->surface,
&image,
&attr->extra);
- if (!STATUS_OK (status))
+ if (status)
return status;
*out = &image->base;
Index: cairo-pdf-surface.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo-pdf-surface.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -d -r1.42 -r1.43
--- cairo-pdf-surface.c 8 Jun 2005 06:28:12 -0000 1.42
+++ cairo-pdf-surface.c 10 Jun 2005 19:18:21 -0000 1.43
@@ -1229,7 +1229,7 @@
src = pattern->surface;
status = _cairo_surface_acquire_source_image (src, &image, &image_extra);
- if (!STATUS_OK (status))
+ if (status)
return status;
id = emit_image_data (dst->document, image);
@@ -1404,7 +1404,7 @@
}
status = _cairo_surface_acquire_source_image (pattern->surface, &image, &image_extra);
- if (!STATUS_OK (status))
+ if (status)
return;
_cairo_pdf_document_close_stream (document);
Index: cairo-png.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo-png.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- cairo-png.c 1 Jun 2005 20:24:10 -0000 1.13
+++ cairo-png.c 10 Jun 2005 19:18:21 -0000 1.14
@@ -212,7 +212,7 @@
status = write_png (surface, stdio_write_func, fp);
- if (fclose (fp) && STATUS_OK (status))
+ if (fclose (fp) && status == CAIRO_STATUS_SUCCESS)
status = CAIRO_STATUS_WRITE_ERROR;
return status;
@@ -226,10 +226,12 @@
static void
stream_write_func (png_structp png, png_bytep data, png_size_t size)
{
+ cairo_status_t status;
struct png_write_closure_t *png_closure;
png_closure = png_get_io_ptr (png);
- if (!STATUS_OK (png_closure->write_func (png_closure->closure, data, size)))
+ status = png_closure->write_func (png_closure->closure, data, size);
+ if (status)
png_error(png, "Write Error");
}
@@ -432,10 +434,12 @@
static void
stream_read_func (png_structp png, png_bytep data, png_size_t size)
{
+ cairo_status_t status;
struct png_read_closure_t *png_closure;
png_closure = png_get_io_ptr (png);
- if (!STATUS_OK (png_closure->read_func (png_closure->closure, data, size)))
+ status = png_closure->read_func (png_closure->closure, data, size);
+ if (status)
png_error(png, "Read Error");
}
Index: cairo-surface.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo-surface.c,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -d -r1.71 -r1.72
--- cairo-surface.c 3 Jun 2005 23:16:44 -0000 1.71
+++ cairo-surface.c 10 Jun 2005 19:18:21 -0000 1.72
@@ -472,7 +472,7 @@
cairo_status_t status;
status = _fallback_init (&state, dst, dst_x, dst_y, width, height);
- if (!STATUS_OK (status) || !state.image)
+ if (status || !state.image)
return status;
state.image->base.backend->composite (operator, src, mask,
@@ -584,7 +584,7 @@
}
status = _fallback_init (&state, surface, x1, y1, x2 - x1, y2 - y1);
- if (!STATUS_OK (status) || !state.image)
+ if (status || !state.image)
return status;
/* If the fetched image isn't at 0,0, we need to offset the rectangles */
@@ -677,7 +677,7 @@
int i;
status = _fallback_init (&state, dst, dst_x, dst_y, width, height);
- if (!STATUS_OK (status) || !state.image)
+ if (status || !state.image)
return status;
/* If the destination image isn't at 0,0, we need to offset the trapezoids */
@@ -842,13 +842,13 @@
#if 0
if (surface->backend->clip_path) {
status = surface->backend->clip_path (surface, NULL);
- if (!STATUS_OK(status))
+ if (status)
return status;
}
#endif
if (surface->backend->set_clip_region != NULL) {
status = surface->backend->set_clip_region (surface, NULL);
- if (!STATUS_OK(status))
+ if (status)
return status;
}
return CAIRO_STATUS_SUCCESS;
Index: cairo-win32-font.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo-win32-font.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- cairo-win32-font.c 3 Jun 2005 23:45:47 -0000 1.20
+++ cairo-win32-font.c 10 Jun 2005 19:18:21 -0000 1.21
@@ -104,6 +104,8 @@
_compute_transform (cairo_win32_scaled_font_t *scaled_font,
cairo_matrix_t *sc)
{
+ cairo_status_t status;
+
if (NEARLY_ZERO (sc->yx) && NEARLY_ZERO (sc->xy)) {
scaled_font->preserve_axes = TRUE;
scaled_font->x_scale = sc->xx;
@@ -154,8 +156,10 @@
1.0 / scaled_font->logical_scale, 1.0 / scaled_font->logical_scale);
scaled_font->device_to_logical = scaled_font->logical_to_device;
- if (!STATUS_OK (cairo_matrix_invert (&scaled_font->device_to_logical)))
- cairo_matrix_init_identity (&scaled_font->device_to_logical);
+
+ status = cairo_matrix_invert (&scaled_font->device_to_logical);
+ if (status)
+ cairo_matrix_init_identity (&scaled_font->device_to_logical);
}
static BYTE
@@ -368,7 +372,7 @@
return _cairo_win32_print_gdi_error ("_cairo_win32_scaled_font_select_unscaled_font");
status = _win32_scaled_font_set_identity_transform (hdc);
- if (!STATUS_OK (status)) {
+ if (status) {
SelectObject (hdc, old_hfont);
return status;
}
@@ -400,7 +404,7 @@
cairo_status_t status;
status = _cairo_utf8_to_utf16 (family, -1, &face_name, &face_name_len);
- if (!STATUS_OK (status))
+ if (status)
return status;
if (face_name_len > LF_FACESIZE - 1) {
@@ -500,7 +504,7 @@
HDC hdc = NULL;
status = _cairo_utf8_to_utf16 (utf8, -1, &utf16, &n16);
- if (!STATUS_OK (status))
+ if (status)
return status;
gcp_results.lStructSize = sizeof (GCP_RESULTS);
@@ -522,7 +526,7 @@
}
status = cairo_win32_scaled_font_select_font (&scaled_font->base, hdc);
- if (!STATUS_OK (status))
+ if (status)
goto FAIL1;
while (TRUE) {
@@ -614,7 +618,7 @@
* from the GDI in logical space, then convert back to font space
*/
status = cairo_win32_scaled_font_select_font (&scaled_font->base, hdc);
- if (!STATUS_OK (status))
+ if (status)
return status;
GetTextMetrics (hdc, &metrics);
cairo_win32_scaled_font_done_font (&scaled_font->base);
@@ -633,7 +637,7 @@
* avoid them.
*/
status = _cairo_win32_scaled_font_select_unscaled_font (&scaled_font->base, hdc);
- if (!STATUS_OK (status))
+ if (status)
return status;
GetTextMetrics (hdc, &metrics);
_cairo_win32_scaled_font_done_unscaled_font (&scaled_font->base);
@@ -676,7 +680,7 @@
* from the GDI in device space and convert to font space.
*/
status = cairo_win32_scaled_font_select_font (&scaled_font->base, hdc);
- if (!STATUS_OK (status))
+ if (status)
return status;
GetGlyphOutlineW (hdc, glyphs[0].index, GGO_METRICS | GGO_GLYPH_INDEX,
&metrics, 0, NULL, &matrix);
@@ -749,7 +753,7 @@
return CAIRO_STATUS_NO_MEMORY;
status = cairo_win32_scaled_font_select_font (&scaled_font->base, hdc);
- if (!STATUS_OK (status))
+ if (status)
return status;
for (i = 0; i < num_glyphs; i++) {
@@ -848,7 +852,7 @@
if (logical_y != state->last_y) {
cairo_status_t status = _flush_glyphs (state);
- if (!STATUS_OK (status))
+ if (status)
return status;
state->start_x = logical_x;
}
@@ -894,7 +898,7 @@
return _cairo_win32_print_gdi_error ("_draw_glyphs_on_surface:SaveDC");
status = cairo_win32_scaled_font_select_font (&scaled_font->base, surface->dc);
- if (!STATUS_OK (status))
+ if (status)
goto FAIL1;
SetTextColor (surface->dc, color);
@@ -906,7 +910,7 @@
for (i = 0; i < num_glyphs; i++) {
status = _add_glyph (&state, glyphs[i].index,
glyphs[i].x - x_offset, glyphs[i].y - y_offset);
- if (!STATUS_OK (status))
+ if (status)
goto FAIL2;
}
@@ -1235,7 +1239,7 @@
}
status = _win32_scaled_font_set_world_transform ((cairo_win32_scaled_font_t *)scaled_font, hdc);
- if (!STATUS_OK (status)) {
+ if (status) {
SetGraphicsMode (hdc, old_mode);
SelectObject (hdc, old_hfont);
return status;
Index: cairo-win32-surface.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo-win32-surface.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- cairo-win32-surface.c 1 Jun 2005 20:24:10 -0000 1.23
+++ cairo-win32-surface.c 10 Jun 2005 19:18:21 -0000 1.24
@@ -1,6 +1,6 @@
/* Cairo - a vector graphics library with display and print output
*
- * Copyright © 2005 Red Hat, Inc.
+ * Copyright © 2005 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it either under the terms of the GNU Lesser General Public
@@ -404,12 +404,13 @@
status = _cairo_win32_surface_get_subimage (abstract_surface, 0, 0,
surface->clip_rect.width,
surface->clip_rect.height, &local);
- if (STATUS_OK (status)) {
- *image_out = (cairo_image_surface_t *)local->image;
- *image_extra = local;
- }
+ if (status)
+ return status;
- return status;
+ *image_out = (cairo_image_surface_t *)local->image;
+ *image_extra = local;
+
+ return CAIRO_STATUS_SUCCESS;
}
static void
@@ -475,17 +476,18 @@
status = _cairo_win32_surface_get_subimage (abstract_surface,
x1, y1, x2 - x1, y2 - y1,
&local);
- if (STATUS_OK (status)) {
- *image_out = (cairo_image_surface_t *)local->image;
- *image_extra = local;
-
- image_rect->x = x1;
- image_rect->y = y1;
- image_rect->width = x2 - x1;
- image_rect->height = y2 - y1;
- }
+ if (status)
+ return status;
- return status;
+ *image_out = (cairo_image_surface_t *)local->image;
+ *image_extra = local;
+
+ image_rect->x = x1;
+ image_rect->y = y1;
+ image_rect->width = x2 - x1;
+ image_rect->height = y2 - y1;
+
+ return CAIRO_STATUS_SUCCESS;
}
static void
Index: cairo-xcb-surface.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo-xcb-surface.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- cairo-xcb-surface.c 1 Jun 2005 20:36:21 -0000 1.32
+++ cairo-xcb-surface.c 10 Jun 2005 19:18:21 -0000 1.33
@@ -850,12 +850,12 @@
return status;
status = _cairo_xcb_surface_set_attributes (src, &src_attr);
- if (STATUS_OK (status))
+ if (status == CAIRO_STATUS_SUCCESS)
{
if (mask)
{
status = _cairo_xcb_surface_set_attributes (mask, &mask_attr);
- if (STATUS_OK (status))
+ if (status == CAIRO_STATUS_SUCCESS)
XCBRenderComposite (dst->dpy,
_render_operator (operator),
src->picture,
@@ -966,7 +966,7 @@
/* XXX: _format_from_cairo is slow. should cache something. */
render_format = _format_from_cairo (dst->dpy, CAIRO_FORMAT_A8),
status = _cairo_xcb_surface_set_attributes (src, &attributes);
- if (STATUS_OK (status))
+ if (status == CAIRO_STATUS_SUCCESS)
XCBRenderTrapezoids (dst->dpy,
_render_operator (operator),
src->picture, dst->picture,
Index: cairo-xlib-surface.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo-xlib-surface.c,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -d -r1.75 -r1.76
--- cairo-xlib-surface.c 3 Jun 2005 21:51:57 -0000 1.75
+++ cairo-xlib-surface.c 10 Jun 2005 19:18:21 -0000 1.76
@@ -820,11 +820,11 @@
status = _cairo_xlib_surface_set_attributes (src, &src_attr);
- if (STATUS_OK (status)) {
+ if (status == CAIRO_STATUS_SUCCESS) {
_cairo_xlib_surface_ensure_dst_picture (dst);
if (mask) {
status = _cairo_xlib_surface_set_attributes (mask, &mask_attr);
- if (STATUS_OK (status))
+ if (status == CAIRO_STATUS_SUCCESS)
XRenderComposite (dst->dpy,
_render_operator (operator),
src->src_picture,
@@ -930,7 +930,7 @@
/* XXX: The XTrapezoid cast is evil and needs to go away somehow. */
_cairo_xlib_surface_ensure_dst_picture (dst);
status = _cairo_xlib_surface_set_attributes (src, &attributes);
- if (STATUS_OK (status))
+ if (status == CAIRO_STATUS_SUCCESS)
XRenderCompositeTrapezoids (dst->dpy,
_render_operator (operator),
src->src_picture, dst->dst_picture,
Index: cairoint.h
===================================================================
RCS file: /cvs/cairo/cairo/src/cairoint.h,v
retrieving revision 1.148
retrieving revision 1.149
diff -u -d -r1.148 -r1.149
--- cairoint.h 3 Jun 2005 23:22:27 -0000 1.148
+++ cairoint.h 10 Jun 2005 19:18:21 -0000 1.149
@@ -191,8 +191,6 @@
CAIRO_INT_STATUS_UNSUPPORTED
} cairo_int_status_t;
-#define STATUS_OK(status) ((status) == CAIRO_STATUS_SUCCESS)
-
typedef enum cairo_direction {
CAIRO_DIRECTION_FORWARD,
CAIRO_DIRECTION_REVERSE
More information about the cairo-commit
mailing list