Quick way to grab stage screenshot/framebuffer
Hey, I'm working in video encoding ANE - all is working great on iOS, except one HUGE bottleneck.
Grabbing 1 frame of application composed of MovieClips/layers etc. is super slow, because the only way I know around this is using BitmapData.draw, which of course redraws everything, including the effects etc., which is really slow for example on iPad 3.
In my case grabbing the frame as fast as possible is super important as I'm trying to achieve realtime video encoding. On the ANE side everything is optimized, using AVFoundation with pixel buffer pools etc. but AIR is killing it with the draw method.
When fooling around in the ANE, I made a list of views AIR is using on iOS, and saw the whole app is running in GL view. Could AIR provide a method to grab GL view somehow ? I tried hacking around it from the ANE(glReadPixels, which I know is slow but doesnt work anyway because the framebuffer is empty by the time Im calling it from ANE). Theres also a way to attach texture to framebuffer I think and have the content always ready there, which would be great - I'm not sure I can bind that texture to AIR's framebuffer though(didnt test this yet, but seems unlikely).
I even managed to grab a screen from ANE, there's a new method in iOS7 which can grab all the UIViews, but that is even slower than AIR unfortunately.
+I'm OpenGL newb. It would be cool if AIR took advantage of running in GL layer and provided some clean method for getting access to memory location with some texture/image from GL which could be used as screenshot/movie frame etc.
