• 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: CALayer scale transform
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CALayer scale transform


  • Subject: Re: CALayer scale transform
  • From: John Harper <email@hidden>
  • Date: Wed, 11 Jun 2008 21:55:15 -0700


On Jun 11, 2008, at 12:39 PM, Jens Alfke wrote:

Are all layers treated as bitmap textures, even solid ones? For instance, if I create a 1024x1024 layer as a background and just set its background color to blue, does that allocate a megapixel's worth of VRAM? What about if I add a border or round corners?

Layers only use textures / VRAM for the images or drawn content you provide. None of the other features (background color, border color) use any texture memory. (Colors that are patterns allocate a texture for the single image cell in the pattern, but not for the layer size.)



I've wondered about this with the Grid class in GeekGameBoard, which is used to represent things like chess or Go boards. Is it better to use one big layer with a custom drawing proc that draws the squares, or 64 (or 324) smaller layers?

For small checks a single layer with a pattern-based background color would be best. For large checks multiple layers may be more efficient. The best way to investigate this kind of thing is via the OpenGL Driver Monitor application, you can use it to display the amount of free VRAM over time,


	John


_______________________________________________

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


References: 
 >CALayer scale transform (From: Brian Christensen <email@hidden>)
 >Re: CALayer scale transform (From: David Duncan <email@hidden>)
 >Re: CALayer scale transform (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: Most efficient way to "merge" CA layers
  • Next by Date: Table View/Array Troubles
  • Previous by thread: Re: CALayer scale transform
  • Next by thread: Looking for Cocoa Developer in Southern California.....
  • Index(es):
    • Date
    • Thread