Re: NSRectFIll() taking 0.03 seconds, too slow?
Re: NSRectFIll() taking 0.03 seconds, too slow?
- Subject: Re: NSRectFIll() taking 0.03 seconds, too slow?
- From: email@hidden
- Date: Sun, 25 Sep 2005 21:59:59 -0700
Just for fun I made a plain empty window in Interface Builder and
checked the
frame speed for resizing (quartz debug app)... just under 36fps at
1024x768 G5 1.8Ghz/Geforce 5200fx...
thats WITH quartz extreme 2D turned on.
Switching to Core graphics may give you a 10% speed up...
seems to be almost exactly half the refresh rate on the display, no
matter how small the window gets.
On 17/09/25, at 15:33, Hisaoki Nishida wrote:
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
_______________________________________________
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