Premultiplied alpha handle for driver

Huang, FrankR FrankR.Huang at amd.com
Fri Jun 4 02:28:07 PDT 2010


Morton,


	If the src is a RGB565, and mask is a A8, dest is a RGB565, how to do the rendering?
	My thought is:
		1) convert the src to  ARGB
		2) then the same as routine.
	Is it correct?

Thanks,
Frank

-----Original Message-----
From: Jonathan Morton [mailto:jonathan.morton at movial.com] 
Sent: 2010年6月2日 2:02
To: Siarhei Siamashka
Cc: xorg-devel at lists.x.org; Huang, FrankR
Subject: Re: Premultiplied alpha handle for driver

On Tue, 2010-06-01 at 19:26 +0300, Siarhei Siamashka wrote:
> On Tuesday 01 June 2010, Jonathan Morton wrote:
> > On Mon, 2010-05-31 at 10:42 +0800, Huang, FrankR wrote:
> > > We know the premultiplied alpha will be used sometimes in blend. Is
> > > that used in the graphics driver?
> >
> > XRender always expects premultiplied alpha in images.  Your previous
> > example, with ARGB values of (100,255,0,0) is therefore an invalid pixel
> > vector, since the R channel is greater than the A channel.
> 
> This is not necessarily invalid. It's more like "additive blending" feature
> which is even used by some people:
> http://home.comcast.net/~tom_forsyth/blog.wiki.html#[[Premultiplied%20alpha]]

Well, that's a corner case, but I was trying to get a conceptual point
across.

-- 
------
From: Jonathan Morton
      jonathan.morton at movial.com






More information about the xorg-devel mailing list