[OT] CopyBits on Mac (was RE: [GD-Windows] BitBlt() syncing to VBL)
Brought to you by:
vexxed72
From: Jon W. <hp...@mi...> - 2002-01-15 20:24:18
|
> >For what it's worth, when I was doing Mac programming, the Apple line > >was always: > > > > "You should assume that CopyBits() is written by super intelligent > > space aliens and will always perform optimally." > > Sadly, CopyBits() is _much_ slower than a memcpy() buried in a > for loop. So > much for super intelligent space aliens :P Well, it usually was the case that you had to "prime" CopyBits by making sure the moon phases were aligned for the source and destination GWorlds, but you could usually get it rolling pretty well. All the cost in CopyBits comes from pre-copy set-up, so the bigger the copy, and the more moon phase alignment you can manage, the faster it gets. Of course, there were special cases, like the "pixel doubling blit" which stuffed one 32-bit pixel twice into a double and used the 64-bit data path to the frame buffer, where CopyBits was lagging behind for a while. But I'd be really surprised if they haven't gotten around to fixing that (and other) by now, seeing as that was five years ago... Cheers, / h+ |