On Mar 12, 2008, at 6:19 AM, Scott Thompson wrote:
I am in a situation where it is basically indifferent to draw a
gradient using CGGradient or drawing it with CGShading.
I need to draw a radial gradient between 2 colors concentric to
each other.
Compatibility issues with systems before Mac OS 10.5 are not an
issue.
Ease of setting my code up is not an issue either.
However performance might be an issue, so I'd like to use the
faster approach between the two.
Does anybody know any benchmarks between CGShading and CGGradient ?
As I recall from the last WWDC, the CGGradient API is simply built
on top of the CGShading API. The CGShading API can be a bit
difficult to figure out (with much of the confusion centering around
CGFunction) CGGradient removes some of that complexity by
implementing common scenarios.
If that is the case, I would expect that the performance of the two
would be roughly similar.
This is true in Leopard. A specific advantage of CGGradient is that
we'll be able to improve its performance significantly in the future
since it's limited to a narrower class of shadings.
Derek
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartz-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartz-dev/email@hidden