Ability to split or mesh transform a CALayer or view hierarchy
| Originator: | cying | ||
| Number: | rdar://11053110 | Date Originated: | 14-Mar-2012 |
| Status: | Duplicate | Resolved: | Open |
| Product: | iPad | Product Version: | Any |
| Classification: | Reproducible: | Yes |
Many Flipboard developer man years have been spent trying to efficiently split a UIView hierarchy in half to perform a cut-in-half Flipboard page flip, either vertically or horizontally, sometimes desiring multiple pages to be in flight. To date, the only way to achieve this effect is to call renderInContext which takes a very slow CPU path and forces us to write custom "view is invalidated" plumbing. We have carefully masked this slow call (rendering the entire UI unresponsive since renderInContext happens on the main thread) over the years by predicting where the user may flip to next and rendering those corresponding pages in idle; compressing them in memory, saving them on disk (in the case of iPhone's vertical flip). We have even tried duplicating the UIView hierarchy and underlying raw CALayers to no avail and slower overall performance. Up until now, we have lived with this burden as a badge of honor, but we stand in awe of the new Retina iPad's hardware and display and are at loss to preserving Flipboard's high level of performance. renderInContext can take nearly twice as long to snapshot a retina UIView hierarchy as before. We have no good ideas on how to work around this new reality. Taking a 1.5x high interpolation snapshot still takes roughly the same amount of time, and produces an unacceptable blurring effect when flipping a page. On top of all this is a massive sinkhole of wasted power, disk and user time on our current strategy for Flipboard's page flip. We implore the Core Animation team to hear our 2 year plight to find a solution. We've seen the world that Maps, iBooks, and other Apple apps enjoy. We hear rumors of a mythical private API, [REDACTED], that would solve all our problems and provide the ability to fold a CALayer in half with appropriate shading and lighting. Getting direct access to the CALayer's texture for a UIView would also work. Making renderInContext GPU accelerated and fast would also work. Being able to split / clone a CALayer into two would also work. Less ideally, the ability to renderInContext in a background thread would help, but not solve the problem. Steps to Reproduce: We shall have a retina build of Flipboard for iPad 1.8.x forthcoming that will show this problem. You can see this today on Flipboard for iPhone. Expected Results: Tears of Joy Actual Results: Tears of Sorrow and Acts of Self Loathing. Regression: Flipboard on iPhone 4, on any iOS version. Flipboard 1.8.2 or greater on iPad with retina snapshots turned on.
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!