[quote=200108:@Garth Hjelte]What does then mean for the REAL/Xojo user? Will a UI NEVER update until an idle point is reached in our apps? Does this mean that doing this:
For i = 0 To 800
ProgressBar1.Value = i / 800
is completely pointless? And I take it that the only reason this worked previously is that the OS was being kind. It technically wasn’t supposed to work.[/quote]
From my understanding of OS X’s graphics architecture, all drawing that ends up on screen is handled by the window server. The window server is responsible for managing and compositing surfaces from all of the applications in the current session onto the GPU using OpenGL (or Metal on 10.11).
Applications request a surface from the WindowServer for each window. All modifications to the surface are done in the application’s process. When the application is finished, the contents of the surface are flushed to the WindowServer and the new content appears on screen.
In addition, every Core Animation layer has its own surface from the WindowServer. Because these surfaces are independent of the window’s surface, the application can avoid redrawing the entire view hierarchy when the contents of a layer-backed view change. Just like the window content, a Core Animation layer’s content has to be flushed before it appears on screen.
RectControl.Refresh just calls through to NSView’s display method. It sounds like this method doesn’t force the surface to be flushed to the WindowServer for layer-backed views on 10.11, likely due to changes Apple made to unify AppKit and Core Animation’s layout and display cycles.
As a bonus, here’s what Apple has to say about synchronous updates:
[quote]When invalidating portions of your views, you should avoid using the display family of methods to force an immediate update. These methods cause the system to send a drawRect: message to the affected view (and potentially other views in the hierarchy) immediately rather than wait until the next regular update cycle. If there are several areas to update, this may result in a lot of extra work for your drawing code.
Instead, you should use the setNeedsDisplay: and setNeedsDisplayInRect: methods to mark areas as needing an update. When you call these methods, the system collects the rectangles you specify and coalesces them into a combined update region, which it then draws during the next update cycle.[/quote]