From 0e1f5a0c495dd7a5c72c9321a29541bdde8f423a Mon Sep 17 00:00:00 2001 From: aliguori Date: Mon, 24 Nov 2008 19:29:13 +0000 Subject: Introduce accessors for DisplayState (Stefano Stabellini) Introducing some accessors: ds_get_linesize ds_get_bits_per_pixel ds_get_width ds_get_height ds_get_data Signed-off-by: Stefano Stabellini Signed-off-by: Anthony Liguori git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5789 c046a42c-6fe2-441c-8c8c-71466251a162 --- vnchextile.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'vnchextile.h') diff --git a/vnchextile.h b/vnchextile.h index eb05feb..e0a62bb 100644 --- a/vnchextile.h +++ b/vnchextile.h @@ -13,7 +13,7 @@ static void CONCAT(send_hextile_tile_, NAME)(VncState *vs, void *last_fg_, int *has_bg, int *has_fg) { - uint8_t *row = (vs->ds->data + y * vs->ds->linesize + x * vs->depth); + uint8_t *row = (ds_get_data(vs->ds) + y * ds_get_linesize(vs->ds) + x * vs->depth); pixel_t *irow = (pixel_t *)row; int j, i; pixel_t *last_bg = (pixel_t *)last_bg_; @@ -57,7 +57,7 @@ static void CONCAT(send_hextile_tile_, NAME)(VncState *vs, } if (n_colors > 2) break; - irow += vs->ds->linesize / sizeof(pixel_t); + irow += ds_get_linesize(vs->ds) / sizeof(pixel_t); } if (n_colors > 1 && fg_count > bg_count) { @@ -105,7 +105,7 @@ static void CONCAT(send_hextile_tile_, NAME)(VncState *vs, n_data += 2; n_subtiles++; } - irow += vs->ds->linesize / sizeof(pixel_t); + irow += ds_get_linesize(vs->ds) / sizeof(pixel_t); } break; case 3: @@ -161,7 +161,7 @@ static void CONCAT(send_hextile_tile_, NAME)(VncState *vs, n_data += 2; n_subtiles++; } - irow += vs->ds->linesize / sizeof(pixel_t); + irow += ds_get_linesize(vs->ds) / sizeof(pixel_t); } /* A SubrectsColoured subtile invalidates the foreground color */ @@ -198,7 +198,7 @@ static void CONCAT(send_hextile_tile_, NAME)(VncState *vs, } else { for (j = 0; j < h; j++) { vs->write_pixels(vs, row, w * vs->depth); - row += vs->ds->linesize; + row += ds_get_linesize(vs->ds); } } } -- cgit v1.1