Re: CATiledLayer too slow to update
Re: CATiledLayer too slow to update
- Subject: Re: CATiledLayer too slow to update
- From: David Duncan <email@hidden>
- Date: Wed, 5 Mar 2008 10:11:31 -0800
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@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden