[cairo-commit] cairo/src cairo-gstate.c, 1.134,
1.135 cairo-xcb-surface.c, 1.31, 1.32
Carl Worth
commit at pdx.freedesktop.org
Wed Jun 1 13:36:23 PDT 2005
Committed by: cworth
Update of /cvs/cairo/cairo/src
In directory gabe:/tmp/cvs-serv24667/src
Modified Files:
cairo-gstate.c cairo-xcb-surface.c
Log Message:
* src/cairo-gstate.c: (_cairo_gstate_init): Remove obsolete
_cairo_gstate_set_target_surface, folding its contents into
_cairo_gstate_init, most of which disappears due to constant
folding. Ensure that gstate->next is initialized even if
_cairo_pattern_create_solid fails.
* src/cairo-xcb-surface.c: Remove unused
_cairo_xcb_surface_set_clip_region.
Index: cairo-gstate.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo-gstate.c,v
retrieving revision 1.134
retrieving revision 1.135
diff -u -d -r1.134 -r1.135
--- cairo-gstate.c 1 Jun 2005 20:24:10 -0000 1.134
+++ cairo-gstate.c 1 Jun 2005 20:36:21 -0000 1.135
@@ -42,10 +42,6 @@
#include "cairo-gstate-private.h"
static cairo_status_t
-_cairo_gstate_set_target_surface (cairo_gstate_t *gstate,
- cairo_surface_t *surface);
-
-static cairo_status_t
_cairo_gstate_clip_and_composite_trapezoids (cairo_gstate_t *gstate,
cairo_pattern_t *src,
cairo_operator_t operator,
@@ -88,8 +84,6 @@
_cairo_gstate_init (cairo_gstate_t *gstate,
cairo_surface_t *target)
{
- cairo_status_t status;
-
gstate->operator = CAIRO_GSTATE_OPERATOR_DEFAULT;
gstate->tolerance = CAIRO_GSTATE_TOLERANCE_DEFAULT;
@@ -120,18 +114,15 @@
_cairo_pen_init_empty (&gstate->pen_regular);
- gstate->target = NULL;
+ gstate->target = target;
+ cairo_surface_reference (gstate->target);
+
+ gstate->next = NULL;
gstate->source = _cairo_pattern_create_solid (CAIRO_COLOR_BLACK);
if (!gstate->source)
return CAIRO_STATUS_NO_MEMORY;
- gstate->next = NULL;
-
- status = _cairo_gstate_set_target_surface (gstate, target);
- if (status)
- return status;
-
return CAIRO_STATUS_SUCCESS;
}
@@ -327,16 +318,6 @@
}
*/
-static cairo_bool_t
-_cairo_gstate_has_surface_clip (cairo_gstate_t *gstate)
-{
- /* check for path clipping here */
-
- if (gstate->clip.region)
- return 1;
- return 0;
-}
-
static cairo_status_t
_cairo_gstate_set_clip (cairo_gstate_t *gstate)
{
@@ -389,39 +370,6 @@
return CAIRO_STATUS_SUCCESS;
}
-static cairo_status_t
-_cairo_gstate_set_target_surface (cairo_gstate_t *gstate, cairo_surface_t *surface)
-{
- if (gstate->target == surface)
- return CAIRO_STATUS_SUCCESS;
-
- /* allocate a new serial to represent our current state. Each
- surface has its own set of serials */
- gstate->clip.serial = 0;
- if (surface && _cairo_gstate_has_surface_clip (gstate))
- gstate->clip.serial = _cairo_surface_allocate_clip_serial (surface);
-
- _cairo_gstate_unset_font (gstate);
-
- if (gstate->target)
- cairo_surface_destroy (gstate->target);
-
- gstate->target = surface;
-
- /* Sometimes the user wants to return to having no target surface,
- * (just like after cairo_create). This can be useful for forcing
- * the old surface to be destroyed. */
- if (surface == NULL) {
- return CAIRO_STATUS_SUCCESS;
- }
-
- cairo_surface_reference (gstate->target);
-
- _cairo_gstate_identity_matrix (gstate);
-
- return CAIRO_STATUS_SUCCESS;
-}
-
cairo_surface_t *
_cairo_gstate_get_target (cairo_gstate_t *gstate)
{
Index: cairo-xcb-surface.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo-xcb-surface.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- cairo-xcb-surface.c 1 Jun 2005 20:24:10 -0000 1.31
+++ cairo-xcb-surface.c 1 Jun 2005 20:36:21 -0000 1.32
@@ -981,14 +981,6 @@
}
static cairo_int_status_t
-_cairo_xcb_surface_set_clip_region (void *abstract_surface,
- pixman_region16_t *region)
-{
- /* XXX: FIXME */
- return CAIRO_INT_STATUS_UNSUPPORTED;
-}
-
-static cairo_int_status_t
_cairo_xcb_surface_get_extents (void *abstract_surface,
cairo_rectangle_t *rectangle)
{
More information about the cairo-commit
mailing list