diff options
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--; ) { |