On Jun 13, 2005, at 10:15 AM, Haroon Sheikh wrote:
The idea is the same as Andrew discussed related to pre-
multiplication. Don't unnecessarily pre-multiply just to pass the
data to CoreGraphics.
I seem to have missed this conversation. Can you elaborate on this
statement, please?
If your application, as part of it's normal course, generates
premultiplied data, then you can pass that to Core Graphics and skip
the premultiplication step altogether.
However, if your application is generating ARGB data that is not
premultiplied, then you will probably be better off passing that un-
premultiplied data to Core Graphics and let it handle that step for
you. Presumably this is because Core Graphics has a much better
understanding of the context used to move your image data through the
graphics pipeline. For example, If you are scaling your image then I
might imagine Core Graphics may be able to get away with only
premultiplying some subset of your data.
Moreover, I suspect that Apple has put a lot of effort into tuning
the premultiplication routines for various processors etc. Core
Graphics can select the most efficient tools at it's disposal to do
the premultiplication. This frees you from having to deal with very
complex issues such as processor features, cache line sizes, junk
like that.
The end result is, if your are already generating premultiplied data,
send that to Core Graphics. If you don't have premultiplied data,
let Core Graphics deal with it instead of trying to preprocess the
data on it's behalf because it can probably make a quicker job of it.
Scott
_______________________________________________
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