From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56951) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zct15-0008Sp-Aa for qemu-devel@nongnu.org; Fri, 18 Sep 2015 06:35:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zct11-0001dP-AI for qemu-devel@nongnu.org; Fri, 18 Sep 2015 06:35:42 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42745) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZcsmY-0003NR-1P for qemu-devel@nongnu.org; Fri, 18 Sep 2015 06:20:42 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id EB7508A344 for ; Fri, 18 Sep 2015 10:20:40 +0000 (UTC) From: Gerd Hoffmann Date: Fri, 18 Sep 2015 12:20:37 +0200 Message-Id: <1442571637-12378-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH] spice: surface switch fast path requires same format too. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann 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 cance to actually trigger this. https://bugzilla.redhat.com/show_bug.cgi?id=1247479 Signed-off-by: Gerd Hoffmann --- 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