summaryrefslogtreecommitdiff
path: root/src/cairo-xlib-surface.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cairo-xlib-surface.c')
-rw-r--r--src/cairo-xlib-surface.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/cairo-xlib-surface.c b/src/cairo-xlib-surface.c
index f127a9c3..eea7baf0 100644
--- a/src/cairo-xlib-surface.c
+++ b/src/cairo-xlib-surface.c
@@ -1104,8 +1104,8 @@ _draw_image_surface (cairo_xlib_surface_t *surface,
int ret;
ximage.bits_per_pixel = image_masks.bpp;
- ximage.bytes_per_line = image->stride;
- ximage.data = (char *)image->data;
+ ximage.bytes_per_line = pixman_image_get_stride (image->pixman_image);
+ ximage.data = (char *) pixman_image_get_data (image->pixman_image);
own_data = FALSE;
ret = XInitImage (&ximage);
@@ -1167,8 +1167,8 @@ _draw_image_surface (cairo_xlib_surface_t *surface,
goto BAIL;
}
- rowstride = image->stride >> 2;
- row = (uint32_t *) image->data;
+ rowstride = pixman_image_get_stride (image->pixman_image) >> 2;
+ row = pixman_image_get_data (image->pixman_image);
x0 = dst_x + surface->base.device_transform.x0;
y0 = dst_y + surface->base.device_transform.y0;
for (y = 0, y_off = y0 % ARRAY_LENGTH (dither_pattern);
@@ -4054,14 +4054,14 @@ _cairo_xlib_surface_add_glyph (cairo_xlib_display_t *display,
glyph_info.xOff = scaled_glyph->x_advance;
glyph_info.yOff = scaled_glyph->y_advance;
- data = glyph_surface->data;
+ data = (unsigned char *) pixman_image_get_data (glyph_surface->pixman_image);
/* flip formats around */
switch (_cairo_xlib_get_glyphset_index_for_format (scaled_glyph->surface->format)) {
case GLYPHSET_INDEX_A1:
/* local bitmaps are always stored with bit == byte */
if (_native_byte_order_lsb() != (BitmapBitOrder (display->display) == LSBFirst)) {
- int c = glyph_surface->stride * glyph_surface->height;
+ int c = pixman_image_get_stride (glyph_surface->pixman_image) * glyph_surface->height;
unsigned char *d;
unsigned char *new, *n;
@@ -4086,7 +4086,7 @@ _cairo_xlib_surface_add_glyph (cairo_xlib_display_t *display,
break;
case GLYPHSET_INDEX_ARGB32:
if (_native_byte_order_lsb() != (ImageByteOrder (display->display) == LSBFirst)) {
- unsigned int c = glyph_surface->stride * glyph_surface->height / 4;
+ unsigned int c = pixman_image_get_stride (glyph_surface->pixman_image) * glyph_surface->height / 4;
const uint32_t *d;
uint32_t *new, *n;
@@ -4113,9 +4113,9 @@ _cairo_xlib_surface_add_glyph (cairo_xlib_display_t *display,
XRenderAddGlyphs (display->display, glyphset_info->glyphset,
&glyph_index, &glyph_info, 1,
(char *) data,
- glyph_surface->stride * glyph_surface->height);
+ pixman_image_get_stride (glyph_surface->pixman_image) * glyph_surface->height);
- if (data != glyph_surface->data)
+ if (data != (unsigned char *) pixman_image_get_data (glyph_surface->pixman_image))
free (data);
_cairo_xlib_scaled_glyph_set_glyphset_info (scaled_glyph, glyphset_info);