aboutsummaryrefslogtreecommitdiffstats
path: root/vnchextile.h
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2009-02-10 15:43:59 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2009-02-10 15:43:59 -0800
commitc27f813900a3c114562efbb8df1065e94766fc48 (patch)
treed95919283707dcab61009e27007374a745c9541e /vnchextile.h
parent0852ad57fa372f9b2854e4df685eaba8d8ef6790 (diff)
downloadexternal_qemu-c27f813900a3c114562efbb8df1065e94766fc48.zip
external_qemu-c27f813900a3c114562efbb8df1065e94766fc48.tar.gz
external_qemu-c27f813900a3c114562efbb8df1065e94766fc48.tar.bz2
auto import from //branches/cupcake/...@130745
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 16a354d..eb05feb 100644
--- a/vnchextile.h
+++ b/vnchextile.h
@@ -2,29 +2,29 @@
#define CONCAT(a, b) CONCAT_I(a, b)
#define pixel_t CONCAT(uint, CONCAT(BPP, _t))
#ifdef GENERIC
-#define NAME generic
+#define NAME CONCAT(generic_, BPP)
#else
#define NAME BPP
#endif
static void CONCAT(send_hextile_tile_, NAME)(VncState *vs,
int x, int y, int w, int h,
- uint32_t *last_bg32,
- uint32_t *last_fg32,
+ void *last_bg_,
+ void *last_fg_,
int *has_bg, int *has_fg)
{
- char *row = (vs->ds->data + y * vs->ds->linesize + x * vs->depth);
+ uint8_t *row = (vs->ds->data + y * vs->ds->linesize + x * vs->depth);
pixel_t *irow = (pixel_t *)row;
int j, i;
- pixel_t *last_bg = (pixel_t *)last_bg32;
- pixel_t *last_fg = (pixel_t *)last_fg32;
+ pixel_t *last_bg = (pixel_t *)last_bg_;
+ pixel_t *last_fg = (pixel_t *)last_fg_;
pixel_t bg = 0;
pixel_t fg = 0;
int n_colors = 0;
int bg_count = 0;
int fg_count = 0;
int flags = 0;
- uint8_t data[(sizeof(pixel_t) + 2) * 16 * 16];
+ uint8_t data[(vs->pix_bpp + 2) * 16 * 16];
int n_data = 0;
int n_subtiles = 0;
@@ -86,7 +86,7 @@ static void CONCAT(send_hextile_tile_, NAME)(VncState *vs,
flags |= 0x08;
irow = (pixel_t *)row;
-
+
for (j = 0; j < h; j++) {
int min_x = -1;
for (i = 0; i < w; i++) {
@@ -119,7 +119,7 @@ static void CONCAT(send_hextile_tile_, NAME)(VncState *vs,
for (j = 0; j < h; j++) {
int has_color = 0;
int min_x = -1;
- pixel_t color;
+ pixel_t color = 0; /* shut up gcc */
for (i = 0; i < w; i++) {
if (!has_color) {