From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35296) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agpuK-0005cs-1d for qemu-devel@nongnu.org; Fri, 18 Mar 2016 04:37:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1agpuE-0001iT-VX for qemu-devel@nongnu.org; Fri, 18 Mar 2016 04:37:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47601) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agpuE-0001iJ-OD for qemu-devel@nongnu.org; Fri, 18 Mar 2016 04:37:14 -0400 Message-ID: <1458289841.6882.16.camel@redhat.com> From: Gerd Hoffmann Date: Fri, 18 Mar 2016 09:30:41 +0100 In-Reply-To: References: <1457967850-8537-1-git-send-email-dhannawatpooja1@gmail.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 Subject: Re: [Qemu-devel] [Patch v2 1/1] blizzard: Remove support for DEPTH != 32 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: QEMU Developers , Pooja Dhannawat On Mo, 2016-03-14 at 15:22 +0000, Peter Maydell wrote: > On 14 March 2016 at 15:04, Pooja Dhannawat wr= ote: > > Removing support for DEPTH !=3D 32 from blizzard template header > > and file that includes it, as macro DEPTH =3D=3D 32 only used. > > > > Signed-off-by: Pooja Dhannawat > > --- > > hw/display/blizzard.c | 24 ------------------------ > > hw/display/blizzard_template.h | 30 +----------------------------- > > 2 files changed, 1 insertion(+), 53 deletions(-) > So are there any cases now when > surface_bits_per_pixel(qemu_console_surface(c)) can return > zero? (I don't understand the 'case 0' code in this switch > at all...) Looks like a somewhat strange way to zero-fill the function pointer array. Looks like a historical leftover. As blizzard uses qemu_console_resize() you will always get a surface with the default depth (32bpp). So dropping the whole "switch { ... }" block (except for the "case 32:" lines) and adding an "assert(surface_bits_per_pixel(surface)=3D=3D32)" should work just fine. cheers, Gerd