aboutsummaryrefslogtreecommitdiff
path: root/vnchextile.h
diff options
context:
space:
mode:
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2008-11-24 19:29:13 +0000
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2008-11-24 19:29:13 +0000
commit0e1f5a0c495dd7a5c72c9321a29541bdde8f423a (patch)
tree374c5da7054c16f764a1cb2b5079d612cf417dac /vnchextile.h
parentcab3bee2d6f1d6eb6ad74006b8a63562cda9ba4d (diff)
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 <stefano.stabellini@eu.citrix.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5789 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'vnchextile.h')
-rw-r--r--vnchextile.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/vnchextile.h b/vnchextile.h
index eb05feb60a..e0a62bbb04 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);
}
}
}