diff options
author | Carl Worth <cworth@cworth.org> | 2005-06-01 13:13:10 +0000 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2005-06-01 13:13:10 +0000 |
commit | 6c62cf76435153c6fdc165d229ee02e52c5c0db5 (patch) | |
tree | 36afccbd1aa1882bc8482e18bef7a3e316ed56fb | |
parent | 707a2c97a1cb709ccf60899576467b898f658481 (diff) |
Remove unused fields from cairo_gstate_t, (font_family, font_slant, font_weight). Reorder fields to match between declaration and initialization and to put the most problematic fields (surface and source) at the end. No intended changes in functionality.
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | src/cairo-gstate-private.h | 14 | ||||
-rw-r--r-- | src/cairo-gstate.c | 14 |
3 files changed, 21 insertions, 16 deletions
@@ -1,5 +1,14 @@ 2005-06-01 Carl Worth <cworth@cworth.org> + * src/cairo-gstate-private.h: + * src/cairo-gstate.c: (_cairo_gstate_init): Remove unused fields + from cairo_gstate_t, (font_family, font_slant, + font_weight). Reorder fields to match between declaration and + initialization and to put the most problematic fields (surface and + source) at the end. No intended changes in functionality. + +2005-06-01 Carl Worth <cworth@cworth.org> + * test/Makefile.am (XFAIL_TESTS): Add self-intersecting to the list of expected failures. diff --git a/src/cairo-gstate-private.h b/src/cairo-gstate-private.h index 03486ac9..da3d60ed 100644 --- a/src/cairo-gstate-private.h +++ b/src/cairo-gstate-private.h @@ -80,26 +80,22 @@ struct _cairo_gstate { int num_dashes; double dash_offset; - char *font_family; /* NULL means CAIRO_FONT_FAMILY_DEFAULT; */ - cairo_font_slant_t font_slant; - cairo_font_weight_t font_weight; - cairo_font_face_t *font_face; cairo_scaled_font_t *scaled_font; /* Specific to the current CTM */ - cairo_surface_t *surface; - - cairo_pattern_t *source; + cairo_matrix_t font_matrix; cairo_clip_t clip; - cairo_matrix_t font_matrix; - cairo_matrix_t ctm; cairo_matrix_t ctm_inverse; cairo_pen_t pen_regular; + cairo_surface_t *surface; + + cairo_pattern_t *source; + struct _cairo_gstate *next; }; diff --git a/src/cairo-gstate.c b/src/cairo-gstate.c index 3f8364f7..e76329c5 100644 --- a/src/cairo-gstate.c +++ b/src/cairo-gstate.c @@ -105,27 +105,27 @@ _cairo_gstate_init (cairo_gstate_t *gstate, gstate->num_dashes = 0; gstate->dash_offset = 0.0; - gstate->scaled_font = NULL; gstate->font_face = NULL; + gstate->scaled_font = NULL; cairo_matrix_init_scale (&gstate->font_matrix, CAIRO_GSTATE_DEFAULT_FONT_SIZE, CAIRO_GSTATE_DEFAULT_FONT_SIZE); - gstate->surface = NULL; - gstate->clip.region = NULL; gstate->clip.surface = NULL; gstate->clip.serial = 0; - gstate->source = _cairo_pattern_create_solid (CAIRO_COLOR_BLACK); - if (!gstate->source) - return CAIRO_STATUS_NO_MEMORY; - _cairo_gstate_identity_matrix (gstate); _cairo_pen_init_empty (&gstate->pen_regular); + gstate->surface = 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); |