From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:35217) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QguE4-00029V-Jr for qemu-devel@nongnu.org; Wed, 13 Jul 2011 03:51:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QguE2-0002pP-U2 for qemu-devel@nongnu.org; Wed, 13 Jul 2011 03:51:20 -0400 Received: from mx1.redhat.com ([209.132.183.28]:18909) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QguE2-0002pC-DF for qemu-devel@nongnu.org; Wed, 13 Jul 2011 03:51:18 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p6D7pH6k007893 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 13 Jul 2011 03:51:17 -0400 Message-ID: <4E1D4E72.3080300@redhat.com> Date: Wed, 13 Jul 2011 09:51:14 +0200 From: Gerd Hoffmann MIME-Version: 1.0 References: <1310478932-25370-1-git-send-email-alevy@redhat.com> <1310478932-25370-17-git-send-email-alevy@redhat.com> In-Reply-To: <1310478932-25370-17-git-send-email-alevy@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCHv3] qxl-render: use update_area_async and update_area_complete List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alon Levy Cc: qemu-devel@nongnu.org Hi, > +void qxl_render_primary_updated(PCIQXLDevice *qxl, QXLRect *dirty, > + uint32_t num_dirty); > @@ -65,6 +65,10 @@ struct SimpleSpiceDisplay { > int notify; > int running; > > +#if SPICE_INTERFACE_QXL_MINOR>= 1 > + QXLRect *dirty_rects; > + uint32_t num_dirty_rects; > +#endif Why do you put this into SimpleSpiceDisplay instead of PCIQXLState? I also wouldn't #ifdef the struct elements to reduce the #ifdef clutter. #ifdefs should only be there in case the code wouldn't compile without them. Additionally you can fill these struct elements in sync mode too and have qxl_render_primary_updated pick up the rectangles from the struct instead of getting them passed in as arguments, thereby reducing the code differences between sync and async mode. cheers, Gerd