• 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
Re: Threaded drawing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Threaded drawing


  • Subject: Re: Threaded drawing
  • From: Roland King <email@hidden>
  • Date: Fri, 06 Dec 2013 21:42:08 +0800

>
>> That might be another way, by the way, render to your own tiled small bitmaps on background threads then blit them into the real context.
>
> Yep, that was also on my list to try, but for top performance it would make sense not to do that if it can be avoided.
>

My WAG would be that works well enough. Heavy lifting on the threads, then toss a bitmap/CGImage copy to the main thread where I'd hope it was just a bitblt into the context. I've seen similar recommended for iOS but only with a fullsize bitmap, not with bits and pieces. In most of those cases the view was an image and the contents was constructed on a background thread and then set into the image outside the drawrect call.

>
>> Perhaps that code is fine on OSX, I'd certainly be happier if there was a create context from context call you could use to relate your small contexts to the draw rect one.
>
> That was what I looked for at first as well, but there doesn’t appear to be such a call, such as CGContextCreateCopy. Pity, hence the veering into hackery territory. But there may be a cleaner way, I just haven’t discovered it yet.

You and I looked for the same API point. If it existed it would probably require the contexts would be used on the same thread and thus be useless.
>

_______________________________________________

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


  • Follow-Ups:
    • Re: Threaded drawing
      • From: Graham Cox <email@hidden>
References: 
 >Threaded drawing (From: Graham Cox <email@hidden>)
 >Re: Threaded drawing (From: Graham Cox <email@hidden>)
 >Re: Threaded drawing (From: Roland King <email@hidden>)
 >Re: Threaded drawing (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: Threaded drawing
  • Next by Date: Re: Threaded drawing
  • Previous by thread: Re: Threaded drawing
  • Next by thread: Re: Threaded drawing
  • Index(es):
    • Date
    • Thread