NSRectFIll() taking 0.03 seconds, too slow?
NSRectFIll() taking 0.03 seconds, too slow?
- Subject: NSRectFIll() taking 0.03 seconds, too slow?
- From: Hisaoki Nishida <email@hidden>
- Date: Sun, 25 Sep 2005 15:33:37 -0700
Hi,
I am working on an app that requires a view (1024x768) to animate at
50fps+.
On my PowerBook 1.5GHz (ATI mobility Radeon 9700) a call to NSRectFill
() is taking as long as 0.03 seconds, which alone translates to 33
fps--which I think is ridiculously expensive.
Reading suggestions from a similar post <http://www.cocoabuilder.com/
archive/message/cocoa/2003/9/29/91883>, I tried using a cached bezier
path and call -fill instead of NSRectFill() (which supposedly makes a
path every time it's called) but it takes just as much time. I also
tried using an NSImage as a background and compositing it to the view
every frame but this was also just as expensive.
One thing I could do to speed it up is only update where it's needed
using NSRectFillList(), but my view is constantly half occupied, so
this would only speed things up by 2x.
Aside from these, are there any alternatives? I would like to avoid
OpenGL if possible, because it would require that I reconstruct much
of my code, and since I am drawing texts, not polygons.
I don't have a better machine to test it on, so I was wondering if
this is because my graphics card is too slow. But even then, 0.03
seconds seems too much.
Thanks,
-hyn
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden