aboutsummaryrefslogtreecommitdiffstats
path: root/vnchextile.h
diff options
context:
space:
mode:
authorDavid 'Digit' Turner <digit@google.com>2009-09-14 14:32:27 -0700
committerDavid 'Digit' Turner <digit@google.com>2009-09-14 14:32:27 -0700
commit5d8f37ad78fc66901af50c762029a501561f3b23 (patch)
tree206790f8f21000850a98c4f9590a79e779106278 /vnchextile.h
parentcd059b15f2c7df69f4a087bd66900eb172e41d1c (diff)
downloadexternal_qemu-5d8f37ad78fc66901af50c762029a501561f3b23.zip
external_qemu-5d8f37ad78fc66901af50c762029a501561f3b23.tar.gz
external_qemu-5d8f37ad78fc66901af50c762029a501561f3b23.tar.bz2
Merge upstream QEMU 10.0.50 into the Android source tree.
This change integrates many changes from the upstream QEMU sources. Its main purpose is to enable correct ARMv6 and ARMv7 support to the Android emulator. Due to the nature of the upstream code base, this unfortunately also required changes to many other parts of the source. Note that to ensure easier integrations in the future, some source files and directories that have heavy Android-specific customization have been renamed with an -android suffix. The original files are still there for easier integration tracking, but *never* compiled. For example: net.c net-android.c qemu-char.c qemu-char-android.c slirp/ slirp-android/ etc... Tested on linux-x86, darwin-x86 and windows host machines.
Diffstat (limited to 'vnchextile.h')
-rw-r--r--vnchextile.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/vnchextile.h b/vnchextile.h
index eb05feb..f5b6fcb 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 = vs->server.ds->data + y * ds_get_linesize(vs->ds) + x * ds_get_bytes_per_pixel(vs->ds);
pixel_t *irow = (pixel_t *)row;
int j, i;
pixel_t *last_bg = (pixel_t *)last_bg_;
@@ -24,7 +24,7 @@ static void CONCAT(send_hextile_tile_, NAME)(VncState *vs,
int bg_count = 0;
int fg_count = 0;
int flags = 0;
- uint8_t data[(vs->pix_bpp + 2) * 16 * 16];
+ uint8_t data[(vs->clientds.pf.bytes_per_pixel + 2) * 16 * 16];
int n_data = 0;
int n_subtiles = 0;
@@ -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:
@@ -132,7 +132,7 @@ static void CONCAT(send_hextile_tile_, NAME)(VncState *vs,
has_color = 0;
#ifdef GENERIC
vnc_convert_pixel(vs, data + n_data, color);
- n_data += vs->pix_bpp;
+ n_data += vs->clientds.pf.bytes_per_pixel;
#else
memcpy(data + n_data, &color, sizeof(color));
n_data += sizeof(pixel_t);
@@ -152,7 +152,7 @@ static void CONCAT(send_hextile_tile_, NAME)(VncState *vs,
if (has_color) {
#ifdef GENERIC
vnc_convert_pixel(vs, data + n_data, color);
- n_data += vs->pix_bpp;
+ n_data += vs->clientds.pf.bytes_per_pixel;
#else
memcpy(data + n_data, &color, sizeof(color));
n_data += sizeof(pixel_t);
@@ -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 */
@@ -197,8 +197,8 @@ 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;
+ vs->write_pixels(vs, row, w * ds_get_bytes_per_pixel(vs->ds));
+ row += ds_get_linesize(vs->ds);
}
}
}