[OGL] validatePipe and antialiasing

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[OGL] validatePipe and antialiasing

Clemens Eisserer
Hello,

I am currently trying to rewrite validatePipe using
OGLSurfaceData.validatePipe() as template,
however  I am a bit confused about what happens in the antialiased
case, e.g. gradient as paint with antialiasing.

E.g. in my case I would like to fallback if the a RadialGradient with
focus!=center is set as paint, however OGLSurfaceData.validatePipe()
does only call isPaintValid() in the non-antialiased case, however it
seems to work fine there.
In my case the fallback is only hit when antialiasing is turned off.

Thanks for your patience, Clemens
Reply | Threaded
Open this post in threaded view
|

Re: [OGL] validatePipe and antialiasing

Chris Campbell-5
Hi Clemens,

The antialiased case is handled in super.validatePipe() (in the  
SurfaceData base class), which in turn calls getMaskFill().  We  
override getMaskFill() in OGLSurfaceData so that it calls  
OGLPaints.isValid() to determine whether the given paint can be  
accelerated in the antialiased case.  If the paint can't be  
accelerated by OGL, we return null to indicate that validatePipe()  
should use a more general/slower path for rendering the paint via  
MaskBlit.  Does this help?

Chris


On Jul 25, 2008, at 5:31 AM, Clemens Eisserer wrote:

> Hello,
>
> I am currently trying to rewrite validatePipe using
> OGLSurfaceData.validatePipe() as template,
> however  I am a bit confused about what happens in the antialiased
> case, e.g. gradient as paint with antialiasing.
>
> E.g. in my case I would like to fallback if the a RadialGradient with
> focus!=center is set as paint, however OGLSurfaceData.validatePipe()
> does only call isPaintValid() in the non-antialiased case, however it
> seems to work fine there.
> In my case the fallback is only hit when antialiasing is turned off.
>
> Thanks for your patience, Clemens

Reply | Threaded
Open this post in threaded view
|

Re: [OGL] validatePipe and antialiasing

Clemens Eisserer
Hi Chris,

> The antialiased case is handled in super.validatePipe() (in the SurfaceData
> base class), which in turn calls getMaskFill().  We override getMaskFill()
> in OGLSurfaceData so that it calls OGLPaints.isValid() to determine whether
> the given paint can be accelerated in the antialiased case.  If the paint
> can't be accelerated by OGL, we return null to indicate that validatePipe()
> should use a more general/slower path for rendering the paint via MaskBlit.
Ah yes there it is. Somehow I overlooked that.

>  Does this help?
Yes, thanks a lot - it works now as intended :)

Thanks a lot, Clemens