Re: Getting immutable UIImage data pointer without copy?

2017-11-14 Thread Rick Mann
> On Nov 14, 2017, at 20:18 , Jens Alfke wrote: > > > >> On Nov 14, 2017, at 8:11 PM, Rick Mann wrote: >> >> Maybe, at least for the bonus question. The bigger question is around the >> copy. > > Where pixmaps live is a pretty complex issue —

Re: Getting immutable UIImage data pointer without copy?

2017-11-14 Thread Quincey Morris
On Nov 14, 2017, at 20:11 , Rick Mann wrote: > > The bigger question is around the copy. In general, the answer must be that a copy ought to be expected. That’s because a data provider is not required to have a data buffer, so there’s not necessarily any underlying data

Re: Getting immutable UIImage data pointer without copy?

2017-11-14 Thread Jens Alfke
> On Nov 14, 2017, at 8:11 PM, Rick Mann wrote: > > Maybe, at least for the bonus question. The bigger question is around the > copy. Where pixmaps live is a pretty complex issue — ideally they live in the GPU’s address space as textures so they can be blitted

Re: Getting immutable UIImage data pointer without copy?

2017-11-14 Thread Rick Mann
> On Nov 14, 2017, at 20:07 , Quincey Morris > wrote: > > On Nov 14, 2017, at 18:36 , Rick Mann wrote: >> >> Is there a way to get at the underlying raw image data for a given UIImage >> (in an immutable buffer) in Swift? >> >>

Re: Getting immutable UIImage data pointer without copy?

2017-11-14 Thread Quincey Morris
(resent to the list) On Nov 14, 2017, at 18:36 , Rick Mann > wrote: > > Is there a way to get at the underlying raw image data for a given UIImage > (in an immutable buffer) in Swift? > > Does this end up making copies? (For bonus points,

Getting immutable UIImage data pointer without copy?

2017-11-14 Thread Rick Mann
Is there a way to get at the underlying raw image data for a given UIImage (in an immutable buffer) in Swift? Does this end up making copies? (For bonus points, what's the array magic?) let img: UIImage = UIImage(named: "MyImage") let data: CFData? = img.CGImage.dataProvider.data let dataArray:

Re: NSTimer not firing when computer is inactive for a while.

2017-11-14 Thread Jens Alfke
> On Nov 14, 2017, at 4:43 PM, Nathan Day wrote: > > The background app is kept alive by launchd as a User Agent and looks for new > resources to be downloaded periodically If this is a launchd agent, you can configure its plist so it gets launched periodically. That way

Re: NSTimer not firing when computer is inactive for a while.

2017-11-14 Thread Quincey Morris
On Nov 14, 2017, at 16:57 , Quincey Morris wrote: > > I would suggest you try setting the QoS to at least “utility”, perhaps even > “user initiated”. To clarify: *what* you set to a different QoS depends on the nature of the thing you described as a

Re: NSTimer not firing when computer is inactive for a while.

2017-11-14 Thread Quincey Morris
On Nov 14, 2017, at 16:43 , Nathan Day wrote: > > I have a background process that uses an NSTimer that is set to fire every > minute, but when the computer is inactive for a while it will stop firing My guess is that it’s not a problem with the timer, but with the quality

Re: NSTimer not firing when computer is inactive for a while.

2017-11-14 Thread Nathan Day
I should make it clear, this is a Mac OS X application. Nathan Day On 14 Nov, 2017, at 01:43 PM, Nathan Day wrote: I have a background process that uses an NSTimer that is set to fire every minute, but when the computer is inactive for a while it will stop firing, its

NSTimer not firing when computer is inactive for a while.

2017-11-14 Thread Nathan Day
I have a background process that uses an NSTimer that is set to fire every minute, but when the computer is inactive for a while it will stop firing, its not until someone interacts with the computer the timer will start firing again. The timer is added to the main NSRunLoop, maybe the