On Aug 4, 2012, at 4:43 PM, Dave Keck <davek...@gmail.com> wrote:

> I'm afraid I sent my question before doing my due diligence though, so
> in the interest of the archives: the reason the invalidated regions
> weren't being redrawn during scrolling was because the block that
> calls -setNeedsDisplayInRect: was scheduled to execute on the main
> thread via dispatch_async(). Due to a change in either NSScrollView,
> NSClipView, or CFRunLoop in 10.8, these blocks are only executed after
> scrolling has stopped. Instead of dispatch_async(), one can use
> CFRunLoopPerformBlock() along with CFRunLoopWakeUp() to have the block
> executed on the main thread during scrolling.

I'm unsure of the wisdom of this approach. Presumably the scroll view is 
intentionally blocking the runloop, and thus assuming that the runloop will not 
fire its event sources until after the scrolling is complete. By waking up the 
runloop, you're violating that assumption and could be causing work the 
scrollview has enqueued to be performed sooner than expected.

--Kyle Sluder
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to