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.

This commit is contained in:
Carl Worth 2005-06-01 13:13:10 +00:00
parent 707a2c97a1
commit 6c62cf7643
3 changed files with 21 additions and 16 deletions

View file

@ -1,3 +1,12 @@
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

View file

@ -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;
};

View file

@ -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);