NSView; size, memory, performance issues
NSView; size, memory, performance issues
- Subject: NSView; size, memory, performance issues
- From: Ivan Kourtev <email@hidden>
- Date: Sat, 10 Apr 2004 14:29:52 -0400
Hi,
I have been (unsuccessfully) trying to find documented answers to two
questions regarding the NSView class and Cocoa drawing in general.
Perhaps someone knows the answers and can explain--here is what I'd
like to know:
1. Does an NSView use a memory buffer for the rendering of the drawing
to the screen or are all drawings buffered and displayed by the
NSWindow containing the view?
I am interested in the answers to this question because I'd like to
estimate the performance costs of resizing an NSView (via NSView
methods such as frame, setFrameSize:, setBounds:, bounds,
setBoundsSize:. Does resizing a view from 100 x 100 to 200 x 200, for
example, require a reallocation of a larger block of memory, copying of
the previous buffer for drawing into the new memory and so on.
2. What is the relationship between a 1x1 square of NSView area and 1
screen pixel--are they the same or is one supposed to look up some
device-dependent (monitor) data for the answer? In short, how does one
write code that displays things in a nearly identical dimensions
regardless of specific monitor used?
It would be helpful if someone could also point to a detailed reference
to learn about the overall drawing system architecture (I've searched
but must've missed them if there are any). I am simply trying to
learn the cost of various calls, data structures used, etc. so I can
consider a balanced structure for an applications before I've actually
written and tested any code for performance, memory use, and so on.
Thanks.
-- ivan
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.