CIImage directly to CALayer contents?
CIImage directly to CALayer contents?
- Subject: CIImage directly to CALayer contents?
- From: Oleg Krupnov <email@hidden>
- Date: Fri, 01 Jul 2011 13:16:55 +0300
Hi,
I'm a little shaky in this area, so I beg your pardon.
CALayer has a "contents" property which is a CGImageRef, i.e. a Core
Graphic image. CGImages are stored in RAM.
CALayer is built on top of OpenGL and uses VRAM to store its bitmap
image internally (a texture).
Now suppose that I have a CIImage constructed with
+imageWithContentsOfURL. The image is loaded (lazily) directly to
VRAM.
So, If I go the suggested route, and first create a CGImage from
CIImage, then assign it to CALayer's contents, I will effectively copy
the image from VRAM to RAM and then again back to VRAM, which is slow,
memory consuming, and generally unnecessary.
Am I correct?
If so, is there a way to pass a CIImage directly to CALayer without
going beyond VRAM?
Thanks!
Oleg.
_______________________________________________
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