Revision bc210eb1

b/hw/vga.c
2413 2413
    }
2414 2414
    linebuf = qemu_pixman_linebuf_create(PIXMAN_BE_r8g8b8, width);
2415 2415
    for (y = 0; y < height; y++) {
2416
        qemu_pixman_linebuf_fill(linebuf, ds->image, width, y);
2416
        qemu_pixman_linebuf_fill(linebuf, ds->image, width, 0, y);
2417 2417
        clearerr(f);
2418 2418
        ret = fwrite(pixman_image_get_data(linebuf), 1,
2419 2419
                     pixman_image_get_stride(linebuf), f);
b/qemu-pixman.c
52 52
}
53 53

  
54 54
void qemu_pixman_linebuf_fill(pixman_image_t *linebuf, pixman_image_t *fb,
55
                              int width, int y)
55
                              int width, int x, int y)
56 56
{
57 57
    pixman_image_composite(PIXMAN_OP_SRC, fb, NULL, linebuf,
58
                           0, y, 0, 0, 0, 0, width, 1);
58
                           x, y, 0, 0, 0, 0, width, 1);
59 59
}
60 60

  
61 61
pixman_image_t *qemu_pixman_mirror_create(pixman_format_code_t format,
b/qemu-pixman.h
31 31
pixman_image_t *qemu_pixman_linebuf_create(pixman_format_code_t format,
32 32
                                           int width);
33 33
void qemu_pixman_linebuf_fill(pixman_image_t *linebuf, pixman_image_t *fb,
34
                              int width, int y);
34
                              int width, int x, int y);
35 35
pixman_image_t *qemu_pixman_mirror_create(pixman_format_code_t format,
36 36
                                          pixman_image_t *image);
37 37
void qemu_pixman_image_unref(pixman_image_t *image);
b/ui/vnc-enc-tight.c
1212 1212
    buf = (uint8_t *)pixman_image_get_data(linebuf);
1213 1213
    row[0] = buf;
1214 1214
    for (dy = 0; dy < h; dy++) {
1215
        qemu_pixman_linebuf_fill(linebuf, vs->vd->server, w, dy);
1215
        qemu_pixman_linebuf_fill(linebuf, vs->vd->server, w, x, y + dy);
1216 1216
        jpeg_write_scanlines(&cinfo, row, 1);
1217 1217
    }
1218 1218
    qemu_pixman_image_unref(linebuf);
......
1356 1356
        if (color_type == PNG_COLOR_TYPE_PALETTE) {
1357 1357
            memcpy(buf, vs->tight.tight.buffer + (dy * w), w);
1358 1358
        } else {
1359
            qemu_pixman_linebuf_fill(linebuf, vs->vd->server, w, dy);
1359
            qemu_pixman_linebuf_fill(linebuf, vs->vd->server, w, x, y + dy);
1360 1360
        }
1361 1361
        png_write_row(png_ptr, buf);
1362 1362
    }
b/ui/vnc.c
2569 2569
            uint8_t *server_ptr;
2570 2570

  
2571 2571
            if (vd->guest.format != VNC_SERVER_FB_FORMAT) {
2572
                qemu_pixman_linebuf_fill(tmpbuf, vd->guest.fb, width, y);
2572
                qemu_pixman_linebuf_fill(tmpbuf, vd->guest.fb, width, 0, y);
2573 2573
                guest_ptr = (uint8_t *)pixman_image_get_data(tmpbuf);
2574 2574
            } else {
2575 2575
                guest_ptr = guest_row;

Also available in: Unified diff