Path: utzoo!attcan!uunet!aplcen!uakari.primate.wisc.edu!zaphod.mps.ohio-state.edu!uwm.edu!bionet!agate!usenet From: deadman@garnet.berkeley.edu (Ben Haller) Newsgroups: comp.sys.mac.programmer Subject: Re: How to call the QuickDraw Bottlenecks from custom bottlenecks? Message-ID: <1990Oct20.044902.11853@agate.berkeley.edu> Date: 20 Oct 90 04:49:02 GMT References: <117652@tiger.oxy.edu> <1562@exodus.Eng.Sun.COM> Sender: usenet@agate.berkeley.edu (USENET Administrator) Organization: Stick Software Lines: 38 In article <117652@tiger.oxy.edu> wirehead@oxy.edu (David J. Harr) writes: >if the bottlenecks are replaced that the application >that replaced the bottlenecks should call the originals through the trap >dispatcher to ensure compatibility. Now, I am missing something here. If I >replace the bottlenecks to increase speed, don't I just shoot myself in the >foot by calling the very routine that I am trying to speed up when I am >finished doing my speedy drawing? I want to support the accelerator cards >and ensure that the people who buy them are not hurt by my replacing the >routines, but I'd also like to run faster on those machines without >acceleration. In article <1562@exodus.Eng.Sun.COM> zellers@prisoner.Eng.Sun.COM (Steve Zellers) writes: > What do you mean, plugging your own bottlenecks in for speed? > Is your code to render a line on the framebuffer FASTER than > apples? Re-read it again, I don't think you're doing quite what > you think you are. Why do you ask with such incredulity? Do you *really* think Apple's code is the fastest possible graphics code? I've written a routine for drawing lines that achieves up to an 11x speedup compared to Apple's code (16 color mode, black only. Any color line, I got a 9.6x or something speedup). And very often, you have additional knowledge that allows a speedup if it's used in the algorithm correctly (like the additional spped I got with the special knowledge that I was drawing a black line). I know Solarian II wouldn't be anywhere *near* fast enough if I were using CopyBits... Now of course it is silly to imagine code beating an accelerator card. So even if you hand-code your graphics, it's probably a good idea to check and see if QuickDraw is faster, and if it is, use it. But if it isn't...and you know how to do the same job better...why not do it. I'm really sick of using QuickDraw. It's slow, and it produces mathematically incorrect results. Myself, the only question I would as of David is, why patch the bottlenecks? Why not just do your stuff directly? As Steve correctly says, the bottlenecks are primarily for modification and interpretation of calls, not for total *replacement*. -Ben Haller (deadman@garnet.berkeley.edu)