[cairo-commit] cairo/src cairo_gstate.c,1.86,1.87
Carl Worth
commit at pdx.freedesktop.org
Fri Feb 25 13:03:44 PST 2005
Committed by: cworth
Update of /cvs/cairo/cairo/src
In directory gabe:/tmp/cvs-serv7456/src
Modified Files:
cairo_gstate.c
Log Message:
From David Reveman:
* src/cairo_gstate.c (_cairo_gstate_show_surface): Simplify code
to eliminate a goto.
Index: cairo_gstate.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo_gstate.c,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -d -r1.86 -r1.87
--- cairo_gstate.c 25 Feb 2005 20:58:49 -0000 1.86
+++ cairo_gstate.c 25 Feb 2005 21:03:42 -0000 1.87
@@ -2026,23 +2026,17 @@
{
_cairo_rectangle_intersect (&extents, &gstate->clip.rect);
- /* Shortcut if empty */
- if (_cairo_rectangle_empty (&extents)) {
- status = CAIRO_STATUS_SUCCESS;
- goto BAIL1;
+ /* We only need to composite if the rectangle is not empty. */
+ if (!_cairo_rectangle_empty (&extents)) {
+ status = _cairo_surface_composite (gstate->operator,
+ &pattern,
+ gstate->clip.surface,
+ gstate->surface,
+ extents.x, extents.y,
+ 0, 0,
+ extents.x, extents.y,
+ extents.width, extents.height);
}
-
- status = _cairo_surface_composite (gstate->operator,
- &pattern,
- gstate->clip.surface,
- gstate->surface,
- extents.x, extents.y,
- 0, 0,
- extents.x, extents.y,
- extents.width, extents.height);
-
- BAIL1:
- ;
}
else
{
More information about the cairo-commit
mailing list