[haiku-development] Re: ShowImage patch

  • From: Christian Packmann <Christian.Packmann@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sun, 08 Mar 2009 19:14:06 +0100

Christian Packmann - 2009-03-08 18:26 :
On to the questions: [...]

I forgot something. How would you like your alpha processing? The C++ code omits it, but I will have to do some processing, as I read/write pixels as a whole, not in byte components.

I could mask the alpha values out, set them to some predefined value, or just process them the same way as the RGB components. The last option would actually be the fastest. Ignoring or setting the alpha value requires additional instructions, which will give some slowdown. Processing them just the same as the RGB components happens automatically, as I will always execute instructions which work on the components of one or two pixels at the same time. So, if there are no good reasons to not process the alpha values, I'd really like to do it. :-)

Christian

Other related posts: