• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Reordering CALayer sublayers without raping my performance?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reordering CALayer sublayers without raping my performance?


  • Subject: Re: Reordering CALayer sublayers without raping my performance?
  • From: Jonathan del Strother <email@hidden>
  • Date: Mon, 19 Nov 2007 09:09:28 +0000

On 16 Nov 2007, at 19:08, David Duncan wrote:

On Nov 16, 2007, at 10:54 AM, Jonathan del Strother wrote:

Hmm, you're right.

Am I misreading this, or does the "Layer Geometry and Transforms" page tell me something completely different :
"The zPosition is intended to be used to set the visual position of the layer relative to its sibling layers. It should not be used to specify the order of layer siblings, instead reorder the layer in the sublayer array."


Well, it is performing a sort when you set zPosition :). So it can be more expensive than just reordering the sublayers array, certainly so if you only have a 2D presentation.

Would you run that past me again? Changing the zPosition re-sorts the sibling layers? In which case, is there any point in re-sorting the child array to specify render order?


I'll test it out later, but I assume that CA is using a depth buffer to make sure that higher zPositioned objects appear in front of others, in which case the only time you need to worry about the order of the child array ought to be if you're dealing with transparent elements.

Is there any way of re-sorting the child element array that doesn't incur a huge performance & memory hit?


Jonathan del Strother _______________________________________________

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


  • Follow-Ups:
    • Re: Reordering CALayer sublayers without raping my performance?
      • From: David Duncan <email@hidden>
References: 
 >Reordering CALayer sublayers without raping my performance? (From: Jonathan del Strother <email@hidden>)
 >Re: Reordering CALayer sublayers without raping my performance? (From: David Duncan <email@hidden>)
 >Re: Reordering CALayer sublayers without raping my performance? (From: Jonathan del Strother <email@hidden>)
 >Re: Reordering CALayer sublayers without raping my performance? (From: David Duncan <email@hidden>)

  • Prev by Date: Re: Design Advice Sought for Interesting NSTableView
  • Next by Date: Re: Programatically creating a checkbox
  • Previous by thread: Re: Reordering CALayer sublayers without raping my performance?
  • Next by thread: Re: Reordering CALayer sublayers without raping my performance?
  • Index(es):
    • Date
    • Thread