[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 1/1] spice: surface switch fast path requires same fo
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PULL 1/1] spice: surface switch fast path requires same format too. |
Date: |
Mon, 21 Sep 2015 11:13:35 +0200 |
Commit "555e72f spice: rework mirror allocation, add no-resize fast path"
adds a fast path for surface switches which does't go through the full
primary surface destroy and re-recreation in case the new surface is
identical to the old one (page-flip). It checks the size only though,
but the format must be identical too. This patch adds the format check.
Commit "0002a51 ui/spice: Support shared surface for most pixman
formats" increases the chance to actually trigger this.
https://bugzilla.redhat.com/show_bug.cgi?id=1247479
Signed-off-by: Gerd Hoffmann <address@hidden>
---
ui/spice-display.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/ui/spice-display.c b/ui/spice-display.c
index 77c8cba..0489131 100644
--- a/ui/spice-display.c
+++ b/ui/spice-display.c
@@ -408,7 +408,8 @@ void qemu_spice_display_switch(SimpleSpiceDisplay *ssd,
if (surface && ssd->surface &&
surface_width(surface) == pixman_image_get_width(ssd->surface) &&
- surface_height(surface) == pixman_image_get_height(ssd->surface)) {
+ surface_height(surface) == pixman_image_get_height(ssd->surface) &&
+ surface_format(surface) == pixman_image_get_format(ssd->surface)) {
/* no-resize fast path: just swap backing store */
dprint(1, "%s/%d: fast (%dx%d)\n", __func__, ssd->qxl.id,
surface_width(surface), surface_height(surface));
--
1.8.3.1