Efficient CVPixelBuffer display in a CALayer
Efficient CVPixelBuffer display in a CALayer
- Subject: Efficient CVPixelBuffer display in a CALayer
- From: Seth Willits <email@hidden>
- Date: Tue, 07 Oct 2014 16:14:08 -0700
If I have an ARGB CVPixelBufferRef, what's the most efficient way to display it in a CALayer?
The only officially supported formats for the CALayer.contents property are NSImage and CGImage, and both of those paths will end up copying the CVPixelBuffer's data on the CPU, and then upload the copy to the GPU. I'm trying to easily avoid that copy.
It seems my only choice is to create an CAOpenGLLayer, manually create a texture from CVPixelBuffer using the typical gl*() calls, and then draw in the layer's drawInCGLContext:::: method.
Is there a simpler option?
--
Seth Willits
_______________________________________________
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