Closed Bug 527696 Opened 16 years ago Closed 16 years ago

Make shadow invalidation always asynchronous and remove the invalidation frequency limit

Categories

(Core :: Widget: Cocoa, defect)

All
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.3a1

People

(Reporter: mstange, Assigned: mstange)

Details

Attachments

(1 file)

Attached patch v1Splinter Review
Invalidating the window shadow synchronously from [ChildView drawRect:] is problematic as soon as transparent child widgets (bug 527685) are involved, since we might invalidate while drawing in a superview before the child view had a chance to draw in the part that was cleared for it (because it's transparent), which leads to holes in the shadow. This can be seen in the toolbar customization panel with the patch for bug 527685 applied: the default button is animating, and sometimes there are flashes of wrong shadows under it. The problem can be solved by calling invalidateShadow asynchronously. However, doing so for each NSView would be a waste of time - we should only do it for each window. That's what this patch does. I've removed the invalidation frequency limit because it does more harm than good. A wrong shadow looks really bad, and shadow invalidation isn't really that expensive.
Attachment #411430 - Flags: review?(joshmoz)
Attachment #411430 - Flags: review?(joshmoz) → review+
Before I land this I need to remember to remove the method definitions of maybeInvalidateShadow and invalidateShadow from @interface ChildView(Private).
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: