[cairo] set_source_rgb vs set_source_rgba [Performance]

Behdad Esfahbod behdad at behdad.org
Fri Aug 15 10:45:06 PDT 2008


Nicholas Allen wrote:
> I would hope that this makes absolutely no difference if the alpha is
> 1.0. If it does then it is definately Cairo's fault IMHO.

I agree.  I have a vague memoy that we did that at some point, but the code
doesn't show that.  Chris may know?

Note that alpha>1.0 may have varying interpretations in the future.... (HDR, etc).

behdad

> Nick
> 
> Ian Britten wrote:
>> Hi all, When drawing solid colours (Alpha=1.0), is there any
>> performance benefit to using set_source_rgb() as opposed to
>> set_source_rgba()?
> 
>> I'm wondering whether to add the complexity to my code to
>> distinguish the two cases and make the appropriate calls, or
>> whether simply calling set_source_rgba() all the time will
>> automatically fall back to same behaviour? [ Obviously, rendering
>> speed is a concern, and I'll add the complexity to our code, if
>> there's a benefit ]
> 
>> Thanks! Ian _______________________________________________ cairo
>> mailing list cairo at cairographics.org
>> http://lists.cairographics.org/mailman/listinfo/cairo
> 

_______________________________________________
cairo mailing list
cairo at cairographics.org
http://lists.cairographics.org/mailman/listinfo/cairo



More information about the cairo mailing list