From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FbmI9-0007ey-09 for mharc-grub-devel@gnu.org; Thu, 04 May 2006 18:27:25 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FbmI6-0007eN-SO for grub-devel@gnu.org; Thu, 04 May 2006 18:27:22 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FbmI1-0007cX-St for grub-devel@gnu.org; Thu, 04 May 2006 18:27:21 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FbmI1-0007cU-NV for grub-devel@gnu.org; Thu, 04 May 2006 18:27:17 -0400 Received: from [195.54.107.73] (helo=mxfep02.bredband.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FbmI2-0006dT-Nw for grub-devel@gnu.org; Thu, 04 May 2006 18:27:19 -0400 Received: from localhost.localdomain ([213.113.223.151] [213.113.223.151]) by mxfep02.bredband.com with ESMTP id <20060504222716.HDDO29994.mxfep02.bredband.com@localhost.localdomain> for ; Fri, 5 May 2006 00:27:16 +0200 From: Johan Rydberg To: The development of GRUB 2 References: <4407474E.6060708@nic.fi> Date: Fri, 05 May 2006 00:27:38 +0200 In-Reply-To: <4407474E.6060708@nic.fi> (Vesa =?iso-8859-1?Q?J=E4=E4skel=E4?= =?iso-8859-1?Q?inen's?= message of "Thu, 02 Mar 2006 21:28:14 +0200") Message-ID: <8764kla0it.fsf@night.trouble.net> User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: New patch for video subsystem... X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 May 2006 22:27:23 -0000 Vesa J=E4=E4skel=E4inen writes: > Here is the newest modifications to video subsystem. Hi Vesa. What a suitable name :) Sorry for the delay, and lack of earlier comments, but I've been out of the GRUB loop for a while. But I have a few comments on the video subsystem; Correct me if I am wrong here, but what you call "render target" seems to be what other video systems call "surface" or "drawable".=20=20 Why use the concept of a "active" render target? Why not instead let all functions that operate on the active render target take a pointer to a specific render target? Poking through your patch, it seems that there a lot of the following (forgive my pseudo-code) grub_video_set_active_render_target (target); // .. fill it with something .. grub_video_fill_rect (color, 0, 0, width, height); grub_video_set_active_render_target (GRUB_VIDEO_RENDER_TARGET_DISPLAY); grub_video_blit_render_target (target, 0, 0, 0, 0, width, height); =20=20=20 I would feel more comfortable with the following workflow: grub_video_fill_rect (target, color, 0, 0, width, height); grub_video_blit_render_target (GRUB_VIDEO_RENDER_TARGET_DISPLAY, target, 0, 0, 0, 0, width, height); Also, I think it is important the user can get hold of a pointer to the render targets data, and an exact pixel format, to do private rendering. It would be hard to make a perfect gradient using fill_rect. I'm not sure the concept of "viewports" are needed at all; instead let the 'application' (e.g, the terminal) render into a render target, and blit that to the screen at the desired position. To minimize memory, the videport-render target can be a sub-render target of the main render target (ie, they share the same buffer) unless the user wants any fancy stuff like a background picture. Thanks, Johan