[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC 6/7] qxl: use spice_qxl_update_area_dirty_async
From: |
Alon Levy |
Subject: |
[Qemu-devel] [RFC 6/7] qxl: use spice_qxl_update_area_dirty_async |
Date: |
Sun, 19 Feb 2012 23:28:05 +0200 |
---
hw/qxl.c | 17 ++++++++---------
1 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/hw/qxl.c b/hw/qxl.c
index 2409cb3..6e25bd1 100644
--- a/hw/qxl.c
+++ b/hw/qxl.c
@@ -150,17 +150,16 @@ void qxl_spice_update_area(PCIQXLDevice *qxl, uint32_t
surface_id,
dirty_rects, num_dirty_rects, clear_dirty_region);
} else {
#if SPICE_INTERFACE_QXL_MINOR >= 1
- struct QXLRect *area_copy;
- if (cookie == NULL) {
- area_copy = g_malloc0(sizeof(*area_copy));
- memcpy(area_copy, area, sizeof(*area));
- area = area_copy;
- cookie = qxl_cookie_new(QXL_COOKIE_TYPE_IO,
- QXL_IO_UPDATE_AREA_ASYNC,
- (uint64_t)area_copy);
- }
+ assert(cookie != NULL);
+#if SPICE_SERVER_VERSION >= 0x000a02
+ /* use dirty rectangles updating api introduced in 0.10.2 */
+ spice_qxl_update_area_dirty_async(&qxl->ssd.qxl, surface_id, area,
+ dirty_rects, num_dirty_rects, clear_dirty_region,
+ (uint64_t)cookie);
+#else
spice_qxl_update_area_async(&qxl->ssd.qxl, surface_id, area,
clear_dirty_region, (uint64_t)cookie);
+#endif
#else
abort();
#endif
--
1.7.9
[Qemu-devel] [RFC 6/7] qxl: use spice_qxl_update_area_dirty_async,
Alon Levy <=
[Qemu-devel] [RFC 7/7] qxl: add allocator, Alon Levy, 2012/02/19
- Re: [Qemu-devel] [RFC 7/7] qxl: add allocator, Gerd Hoffmann, 2012/02/20
- Re: [Qemu-devel] [RFC 7/7] qxl: add allocator, Alon Levy, 2012/02/20
- Re: [Qemu-devel] [RFC 7/7] qxl: add allocator, Gerd Hoffmann, 2012/02/20
- Re: [Qemu-devel] [RFC 7/7] qxl: add allocator, Alon Levy, 2012/02/20
- Re: [Qemu-devel] [RFC 7/7] qxl: add allocator, Gerd Hoffmann, 2012/02/21
- Re: [Qemu-devel] [RFC 7/7] qxl: add allocator, Alon Levy, 2012/02/21
- Re: [Qemu-devel] [RFC 7/7] qxl: add allocator, Gerd Hoffmann, 2012/02/21
- Re: [Qemu-devel] [RFC 7/7] qxl: add allocator, Alon Levy, 2012/02/21
[Qemu-devel] [RFC 5/7] qxl-render: call ppm_save on callback, Alon Levy, 2012/02/19