[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 13/20] vnc: use vnc_{width, height} in vnc_set_area_d
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PULL 13/20] vnc: use vnc_{width, height} in vnc_set_area_dirty |
Date: |
Mon, 16 Nov 2015 18:25:28 +0100 |
Signed-off-by: Gerd Hoffmann <address@hidden>
Reviewed-by: Peter Lieven <address@hidden>
Reviewed-by: Daniel P. Berrange <address@hidden>
Message-id: address@hidden
---
ui/vnc.c | 21 ++++++++++-----------
1 file changed, 10 insertions(+), 11 deletions(-)
diff --git a/ui/vnc.c b/ui/vnc.c
index 58a66b5..eb1fcb3 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -628,8 +628,12 @@ static int vnc_height(VncDisplay *vd)
static void vnc_set_area_dirty(DECLARE_BITMAP(dirty[VNC_MAX_HEIGHT],
VNC_MAX_WIDTH / VNC_DIRTY_PIXELS_PER_BIT),
- int width, int height,
- int x, int y, int w, int h) {
+ VncDisplay *vd,
+ int x, int y, int w, int h)
+{
+ int width = vnc_width(vd);
+ int height = vnc_height(vd);
+
/* this is needed this to ensure we updated all affected
* blocks if x % VNC_DIRTY_PIXELS_PER_BIT != 0 */
w += (x % VNC_DIRTY_PIXELS_PER_BIT);
@@ -651,10 +655,8 @@ static void vnc_dpy_update(DisplayChangeListener *dcl,
{
VncDisplay *vd = container_of(dcl, VncDisplay, dcl);
struct VncSurface *s = &vd->guest;
- int width = pixman_image_get_width(vd->server);
- int height = pixman_image_get_height(vd->server);
- vnc_set_area_dirty(s->dirty, width, height, x, y, w, h);
+ vnc_set_area_dirty(s->dirty, vd, x, y, w, h);
}
void vnc_framebuffer_update(VncState *vs, int x, int y, int w, int h,
@@ -755,7 +757,7 @@ static void vnc_dpy_switch(DisplayChangeListener *dcl,
width = vnc_width(vd);
height = vnc_height(vd);
memset(vd->guest.dirty, 0x00, sizeof(vd->guest.dirty));
- vnc_set_area_dirty(vd->guest.dirty, width, height, 0, 0,
+ vnc_set_area_dirty(vd->guest.dirty, vd, 0, 0,
width, height);
QTAILQ_FOREACH(vs, &vd->clients, next) {
@@ -765,7 +767,7 @@ static void vnc_dpy_switch(DisplayChangeListener *dcl,
vnc_cursor_define(vs);
}
memset(vs->dirty, 0x00, sizeof(vs->dirty));
- vnc_set_area_dirty(vs->dirty, width, height, 0, 0,
+ vnc_set_area_dirty(vs->dirty, vd, 0, 0,
width, height);
}
}
@@ -2021,9 +2023,6 @@ static void ext_key_event(VncState *vs, int down,
static void framebuffer_update_request(VncState *vs, int incremental,
int x, int y, int w, int h)
{
- int width = pixman_image_get_width(vs->vd->server);
- int height = pixman_image_get_height(vs->vd->server);
-
vs->need_update = 1;
if (incremental) {
@@ -2031,7 +2030,7 @@ static void framebuffer_update_request(VncState *vs, int
incremental,
}
vs->force_update = 1;
- vnc_set_area_dirty(vs->dirty, width, height, x, y, w, h);
+ vnc_set_area_dirty(vs->dirty, vs->vd, x, y, w, h);
}
static void send_ext_key_event_ack(VncState *vs)
--
1.8.3.1
- [Qemu-devel] [PULL for-2.5 00/20] vnc: buffer code improvements, bugfixes., Gerd Hoffmann, 2015/11/16
- [Qemu-devel] [PULL 13/20] vnc: use vnc_{width, height} in vnc_set_area_dirty,
Gerd Hoffmann <=
- [Qemu-devel] [PULL 01/20] buffer: make the Buffer capacity increase in powers of two, Gerd Hoffmann, 2015/11/16
- [Qemu-devel] [PULL 09/20] vnc-jobs: move buffer reset, use new buffer move, Gerd Hoffmann, 2015/11/16
- [Qemu-devel] [PULL 04/20] buffer: add buffer_move, Gerd Hoffmann, 2015/11/16
- [Qemu-devel] [PULL 10/20] vnc: zap dead code, Gerd Hoffmann, 2015/11/16
- [Qemu-devel] [PULL 06/20] buffer: add tracing, Gerd Hoffmann, 2015/11/16
- [Qemu-devel] [PULL 08/20] vnc: kill jobs queue buffer, Gerd Hoffmann, 2015/11/16
- [Qemu-devel] [PULL 02/20] buffer: add buffer_init, Gerd Hoffmann, 2015/11/16
- [Qemu-devel] [PULL 18/20] buffer: factor out buffer_adj_size, Gerd Hoffmann, 2015/11/16
- [Qemu-devel] [PULL 16/20] vnc: recycle empty vs->output buffer, Gerd Hoffmann, 2015/11/16
- [Qemu-devel] [PULL 19/20] buffer: allow a buffer to shrink gracefully, Gerd Hoffmann, 2015/11/16