Re: Threaded drawing
Re: Threaded drawing
- Subject: Re: Threaded drawing
- From: Kyle Sluder <email@hidden>
- Date: Mon, 09 Dec 2013 09:23:13 -0800
> On Dec 9, 2013, at 8:50 AM, Graham Cox <email@hidden> wrote:
>
>
>> On 9 Dec 2013, at 5:45 pm, David Duncan <email@hidden> wrote:
>>
>> If you have a buffer to draw into, then you can easily slice that buffer to use between multiple graphics contexts, but you will fundamentally have to draw them all into the source context at the end.
>
>
> I wasn’t able to figure out how to do this, so I haven’t tested to see if it’s any faster.
>
> By “slice the buffer”, I assume you mean set up a context on some region of that buffer, but when I tried to do that, CGBitmapContextCreate[WithData] would not accept my bytesPerRow value because it was inconsistent with the ‘width’ value, even though I had calculated the bytesPerRow to be the correct offset anyway.
>
> So if you know of a practical way to “slice the buffer”, please do share!
What if all your contexts used the same backing bitmap, but you were extremely careful to set up their clipping regions such that they never touched the same pixels?
But I'd seriously consider Mike Abdullah's suggestion. It sounds like CATiledLayer does most if not all of this work already.
--Kyle Sluder
_______________________________________________
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