On Mar 4, 2008, at 8:57 PM, Colin Cornaby wrote:

I'm using a CATiledLayer to render a large background in my CoreAnimation composition. A CATiledLayer seems to be best suited for the job due to the size of the composition. However, one problem I am running into is when the tiles become very small, the layer can be very slow to update. This doesn't seem like an overhead issue to me as I am supplying layer content from a CGLayerRef, which should be very fast at drawing an image of the same size. Rather, it seems to me like the CAScollLayer is distributing the drawing over a period of time.

It would be far more advantageous to me, in addition to the poor user who has to sit through the tiny tiles being drawn one by one, to draw all layers as soon as they need to be displayed.

Does anyone have any workarounds for this, or workarounds for drawing backgrounds in general? It would be nice to draw the background by hand without the aid of a tile layer, but I've found no way to keep a background synchronized with a parent CAScrollLayer properly.


Draw bigger tiles. The smaller the tiles, the greater the overhead. From the sounds of it, you might be zooming the layer as well, in which case you might want to use the LOD properties (levelsOfDetail and levelsOfDetailBias) in order to reduce the amount of work you need to do to fill the visible area (and correspondingly reduce the amount of time needed to render when your zoomed out).
--
David Duncan
Apple DTS Animation and Printing
[EMAIL PROTECTED]



_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to