diff options
author | Benjamin Otte <otte@gnome.org> | 2010-01-15 10:52:05 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2010-04-23 23:30:08 +0200 |
commit | 16c9198347e874dcc38c35d1f5832ee0e70062a3 (patch) | |
tree | ed5f0f8bd85b360ec465bb757b25922d0d6cf037 /src/cairo-scaled-font.c | |
parent | 1687c7b7d3074de8eeea1a5c339df9a12cc38da2 (diff) |
remove duplicated members from image surface struct
Also introduce cairo_image_surface_get_data_for_row() macro and use it instead.
Diffstat (limited to 'src/cairo-scaled-font.c')
-rw-r--r-- | src/cairo-scaled-font.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/cairo-scaled-font.c b/src/cairo-scaled-font.c index 861c0ab0..f7371f07 100644 --- a/src/cairo-scaled-font.c +++ b/src/cairo-scaled-font.c @@ -2300,12 +2300,13 @@ _trace_mask_to_path (cairo_image_surface_t *mask, double tx, double ty) { const uint8_t *row; - int rows, cols, bytes_per_row; + int cols, bytes_per_row; int x, y, bit; double xoff, yoff; cairo_fixed_t x0, y0; cairo_fixed_t px, py; cairo_status_t status; + unsigned int stride; mask = _cairo_image_surface_coerce_to_format (mask, CAIRO_FORMAT_A1); status = mask->base.status; @@ -2317,9 +2318,10 @@ _trace_mask_to_path (cairo_image_surface_t *mask, y0 = _cairo_fixed_from_double (ty - yoff); bytes_per_row = (mask->width + 7) / 8; - row = mask->data; - for (y = 0, rows = mask->height; rows--; row += mask->stride, y++) { - const uint8_t *byte_ptr = row; + row = (uint8_t *) pixman_image_get_data (mask->pixman_image); + stride = pixman_image_get_stride (mask->pixman_image); + for (y = 0; y < mask->height; y++) { + const uint8_t *byte_ptr = cairo_image_surface_get_data_for_row (mask, y); x = 0; py = _cairo_fixed_from_int (y); for (cols = bytes_per_row; cols--; ) { |