Re: fast blitting with Quartz
Re: fast blitting with Quartz
- Subject: Re: fast blitting with Quartz
- From: Wade Tregaskis <email@hidden>
- Date: Fri, 28 Sep 2007 11:45:37 -0700
Are you sure about the magnitude of your dimension there? I was
under the impression (potentially mistaken) that the problems
started around 10,000 (ten thousand) instead of 10,000,000 (10
million).
I had it my head that 100,000 was the magic number, for whatever
reason, but I went and actually tested before posting, and in my
particular test app, problems are hit at around 11.4 million pixels.
But as I said, it really depends on your code as well - most
significantly (in my experience) if you're using floats throughout
(e.g. for consistency with CoreGraphics), you're adding additional
rounding error versus using doubles for your own "internal"
calculations. Always* use the highest floating-point precision
available for intermediate calculations, even if you know you'll be
reducing precision somewhere down the line.
it also depends on when and how you calculate clipping, how you do
rounding, coalescing, etc etc etc. Very much implementation
dependent. But if you're careful in your own code, like I've had to
be in the aforementioned example case, you can get to 10 million
pixels without noticeable glitches.
Wade
* = Converting doubles to floats does have a non-zero cost, but
there's no point trying to guess whether this will matter; Shark your
code once you've written the conservative, working version, and go
from there.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden