Re: 10.8 copiesOnScroll, -setNeedsDisplayInRect: ignored during scrolling
Re: 10.8 copiesOnScroll, -setNeedsDisplayInRect: ignored during scrolling
- Subject: Re: 10.8 copiesOnScroll, -setNeedsDisplayInRect: ignored during scrolling
- From: Quincey Morris <email@hidden>
- Date: Sat, 04 Aug 2012 16:07:29 -0700
On Aug 4, 2012, at 14:35 , Dave Keck <email@hidden> wrote:
> I'm working on a scrollable grid view and noticed that its appearance
> during scrolling has regressed since installing 10.8.
>
> This grid view loads content in the background and calls
> -setNeedsDisplayInRect: (thread-safely) as content becomes available.
>
> With copy-on-scroll enabled, -setNeedsDisplayInRect: seems to be
> ignored until scrolling stops, at which point the content snaps in.
> With copy-on-scroll disabled, the view displays normally, but is less
> performant than the copy-on-scroll version running on 10.7.
>
> Is there a way to have these setNeedsDisplayInRect: calls respected
> during scrolling?
Could you clarify: you're talking about the content of the area exposed by the scroll, yes? Or the previously-drawn area that's actually in motion?
For the latter, it seems hardly surprising that the content wouldn't appear until you stop scrolling, since by setting the copy-on-scroll flag you've promised that the old view contents don't change during scrolling.
For the former, what do you actually see? A duplicate of the contents that were moved by the scrolling? The window background color? Placeholder content that you provide while the content is being loaded?
If the scroll view is using CA to do the scrolling (or, perhaps, using it more aggressively than in the past), then it might not be surprising that 'setNeedsDisplayInRect:' merely causes an already-rendered layer to be re-displayed, rather than causing the layer to be re-rendered, if an animation is in progress.
I also wonder if NSView's "layerContentsRedrawPolicy" has anything to do with the results, though I'm puzzled to suggest which view in the scroll view hierarchy would be the place to change the policy. (Also, the documentation tends to suggest that the policy applies only during resizing, not during animations generally, so this may be an irrelevance.)
_______________________________________________
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