• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Efficient CVPixelBuffer display in a CALayer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Finding in a WebView
  • Next by Date: Re: Responsive scrolling: prepareContentInRect: not called
  • Previous by thread: Finding in a WebView
  • Next by thread: Memory Warnings
  • Index(es):
    • Date
    • Thread