• 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 - JPEG
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Threaded drawing - JPEG


  • Subject: Re: Threaded drawing - JPEG
  • From: Greg Parker <email@hidden>
  • Date: Wed, 11 Dec 2013 14:43:07 -0800

On Dec 11, 2013, at 9:53 AM, Steve Sisak <email@hidden> wrote:
> Not to hijack the thread, but I'm just getting head into optimizing some code which displays live preview for a number of JPEG streams simultaneously.
>
> Most implementations I've tried result in being CPU bound in JPEG code on the main thread with the 7 other cores idle.
>
> I've tried variants of NSImageView, CGImage and CIImage and all that's needed to render them on alternate threads but Cocoa appears to so good at delaying evaluation as long as possible that it seems to end up calling the JPEG decoder synchronously from -drawRect of whatever view subclass I've chosen on the main thread.

Simple attempt: when you get the JPEG, create a CGBitmapContext on a background thread and draw the JPEG into it. Then use the CGBitmapContext to draw on the main thread.


--
Greg Parker     email@hidden     Runtime Wrangler



_______________________________________________

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 - JPEG
      • From: Kevin Meaney <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>)
 >Re: Threaded drawing (From: Roland King <email@hidden>)
 >Re: Threaded drawing (From: Graham Cox <email@hidden>)
 >Re: Threaded drawing (From: Graham Cox <email@hidden>)
 >Re: Threaded drawing (From: Seth Willits <email@hidden>)
 >Re: Threaded drawing (From: Graham Cox <email@hidden>)
 >Re: Threaded drawing (From: Jens Alfke <email@hidden>)
 >Re: Threaded drawing (From: Kyle Sluder <email@hidden>)
 >Re: Threaded drawing (From: Graham Cox <email@hidden>)
 >Re: Threaded drawing (From: Seth Willits <email@hidden>)
 >Re: Threaded drawing - JPEG (From: Steve Sisak <email@hidden>)

  • Prev by Date: Re: Strange Static Analyzer Warning
  • Next by Date: Re: Threaded drawing
  • Previous by thread: Re: Threaded drawing - JPEG
  • Next by thread: Re: Threaded drawing - JPEG
  • Index(es):
    • Date
    • Thread