weixin_39603613 2020-11-30 04:47
浏览 0

iOS: optimize the Texture screenshot / rasterization code

https://developer.apple.com/library/ios/documentation/GLkit/Reference/GLKTextureLoader_ClassRef/index.html#//apple_ref/doc/uid/TP40010922-CH1-SW21

I'm wondering if this allows to use UIImage without doing any memory allocation and saving CPU<>GPU roundtrip.

also maybe with this approach we could also more efficiently screenshot an UIView.

该提问来源于开源项目:gre/gl-react-native-v2

  • 写回答

6条回答 默认 最新

  • weixin_39603613 2020-11-30 04:47
    关注

    useful discovery:

    CVOpenGLESTextureCacheCreateTextureFromImage

    https://developer.apple.com/library/ios/samplecode/AVBasicVideoOutput/Introduction/Intro.html#//apple_ref/doc/uid/DTS40013109

    http://stackoverflow.com/questions/9550297/faster-alternative-to-glreadpixels-in-iphone-opengl-es-2-0/9704392#9704392

    评论

报告相同问题?