Re: lockFocusIfCanDraw behavior in layer-backed mode

2018-12-23 Thread Tor Arne Vestbø
Thank you Matt for a very detailed and thorough reply! This is very useful and clarifying information. > On 17 Dec 2018, at 20:39, Matt Jacobson wrote: > > Even if it were, it’s still unsafe to ignore the rect passed to -drawRect:. > That’s because the system might require you to redraw a

Re: lockFocusIfCanDraw behavior in layer-backed mode

2018-12-17 Thread Matt Jacobson
Hi, > On Dec 15, 2018, at 7:07 AM, Tor Arne Vestbø wrote: > > Hey hey, > >> On 15 Dec 2018, at 01:38, Matt Jacobson wrote: >> >> You were probably calling -lockFocusIfCanDraw >> , >> which does not say

Re: lockFocusIfCanDraw behavior in layer-backed mode

2018-12-17 Thread Richard Charles
> On Dec 16, 2018, at 6:34 PM, Tor Arne Vestbø wrote: > > The session doesn’t go into what do if you want to draw synchronously outside > of the display cycle though. Is it enough to setNeedsDisplay and then call > [NSView displayIfNeeded] or [CALayer displayIfNeeded]? I guess the latter >

Re: lockFocusIfCanDraw behavior in layer-backed mode

2018-12-16 Thread Tor Arne Vestbø
> On 15 Dec 2018, at 18:49, Richard Charles wrote: > > >> On Dec 15, 2018, at 8:07 AM, Tor Arne Vestbø wrote: >> >> Piggy-backing on this thread, what does lockFocusIfCanDraw actually do in >> layer-backed mode? > > I have a layer-hosting view running under macOS 10.12.6 and lockFocus is

Re: lockFocusIfCanDraw behavior in layer-backed mode

2018-12-15 Thread Richard Charles
> On Dec 15, 2018, at 8:07 AM, Tor Arne Vestbø wrote: > > Piggy-backing on this thread, what does lockFocusIfCanDraw actually do in > layer-backed mode? I have a layer-hosting view running under macOS 10.12.6 and lockFocus is called by the system frameworks. #0 0x0001000748f4 in

lockFocusIfCanDraw behavior in layer-backed mode

2018-12-15 Thread Tor Arne Vestbø
Hey hey, > On 15 Dec 2018, at 01:38, Matt Jacobson wrote: > > You were probably calling -lockFocusIfCanDraw > , > which does not say that. Piggy-backing on this thread, what does lockFocusIfCanDraw actually