All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Vesa Jääskeläinen" <chaac@nic.fi>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: [PATCH] GSoC #09 Bitmap scaling
Date: Tue, 14 Oct 2008 00:11:42 +0300	[thread overview]
Message-ID: <48F3B98E.4060109@nic.fi> (raw)
In-Reply-To: <20081013130005.2adac4b2@gibibit.com>

Colin D Bennett wrote:
> On Mon, 13 Oct 2008 21:27:46 +0300
> Vesa Jääskeläinen <chaac@nic.fi> wrote:
>> Idea is that if bitmap is still locked you cannot optimize it or you
>> cannot lock it again. And if bitmap is optimized you cannot get
>> pointer to modify it. Eg. Function call returns memory pointer.
> 
> I thought perhaps the 'optimize' operation would simply return a _new_
> (and completely independent from that point forward) bitmap equivalent
> to the input bitmap but in the same format as the current video mode
> uses.

Problem with that is that it makes supporting code harder to use. With
only handful of supported formats it much easier to write support code
to modify bitmap. If you allow to use any format supported by video
subsystem it is nightmare to support them all.

So if we just support two formats. We only need to care about RGB and
RGBA formats, rather easy task. Can be modified by using simple loops or
indexing. When we know that there is no modifications to be done for
bitmap, we can just call optimize() and it will convert (edited) bitmap
to fast to blit format.

As we have same handle all the time for bitmap we can just continue to
use it as is. If we would make new instance of it, would either need to
delete previous one and replace its usage with new one. Of course use
case here affects.

> Are you thinking that it would be best to have the
> 'optimize'/'unoptimize' operations actually just modify the bitmap in
> place?  I guess this is nice from a memory conservation standpoint, but
> in some cases it wouldn't work well (i.e., 24-bit to 32-bit formats).

I do not think at this point how optimize() or unoptimize() will be
implemented. Just general idea. Whether it is in-place operation or
re-allocation for memory, is same to me. It just have to work :)

Thanks,
Vesa Jääskeläinen



  reply	other threads:[~2008-10-13 21:11 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-31  7:01 [PATCH] GSoC #09 Bitmap scaling Colin D Bennett
2008-08-31 16:21 ` Vesa Jääskeläinen
2008-08-31 16:24   ` Vesa Jääskeläinen
2008-09-02 15:42   ` Vesa Jääskeläinen
2008-10-03 20:16     ` Vesa Jääskeläinen
2008-10-13 17:00       ` Colin D Bennett
2008-10-13 18:27         ` Vesa Jääskeläinen
2008-10-13 20:00           ` Colin D Bennett
2008-10-13 21:11             ` Vesa Jääskeläinen [this message]
2008-10-15  5:42               ` Colin D Bennett
2008-10-15 14:34                 ` Vesa Jääskeläinen
2008-10-30  3:20                   ` Colin D Bennett

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48F3B98E.4060109@nic.fi \
    --to=chaac@nic.fi \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.