Re: Rendering a raw image buffer
Re: Rendering a raw image buffer
- Subject: Re: Rendering a raw image buffer
- From: Graham Cox <email@hidden>
- Date: Fri, 22 Feb 2013 13:44:19 +1100
On 22/02/2013, at 1:30 PM, Ken Thomases <email@hidden> wrote:
> I don't know that you can. You should probably create a fresh CGImage from the data for each render, unless you know that you'll render repeatedly with the same CGImage (which implies "with the same image content"). I believe that creating a new CGImage and drawing with that _is_ the way of telling the frameworks "I have updated pixel data and I want to draw it as efficiently as possible".
OK, creating a new image each time works well enough (that is, it works great, but I haven't profiled it yet to see whether it's really efficient), and I can extend that to only be recreated when the underlying data is changed, so that should be fine.
I think the key point I was missing is the fundamental immutability of CGImage....
Thanks! :)
--Graham
_______________________________________________
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