CALayer zPosition is unreliable above some number, documentation does not indicate this

Originator:aufflick
Number:rdar://12516023 Date Originated:2012-12-17
Status:Open Resolved:
Product:Xcode Product Version:4.5.1
Classification:Other Bug Reproducible:Always
 
Summary:

I have a subclass of CALayer that implements drawInContext: and also has borderWidth, borderColor. It works fine.

If I set the zPosition of the layer to be above about 1e38 it all works fine on my iMac, but on my MBP and MBA it only draws the border, no contents (drawInContext: is called, but no contents display).

In fact on my iMac it works up to and include CGFLOAT_MAX (my idea was a layer that would be guaranteed to be at the top).

Steps to Reproduce:

Set a CALayer zPosition to be CGFLOAT_MAX.

Expected Results:

The layer draws.

Actual Results:

The layer draws only on some Macs.

Notes:

This is presumably a limitation of video hardware and as such should really be documented in the CALayer docs.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!