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
This commit is contained in:
aliguori 2008-11-24 19:29:13 +00:00
parent cab3bee2d6
commit 0e1f5a0c49
20 changed files with 205 additions and 180 deletions

View file

@ -2321,9 +2321,9 @@ static void cirrus_cursor_draw_line(VGAState *s1, uint8_t *d1, int scr_y)
color1 = s->rgb_to_pixel(c6_to_8(palette[0xf * 3]),
c6_to_8(palette[0xf * 3 + 1]),
c6_to_8(palette[0xf * 3 + 2]));
bpp = ((s->ds->depth + 7) >> 3);
bpp = ((ds_get_bits_per_pixel(s->ds) + 7) >> 3);
d1 += x1 * bpp;
switch(s->ds->depth) {
switch(ds_get_bits_per_pixel(s->ds)) {
default:
break;
case 8: