Closed Bug 1496823 Opened 3 years ago Closed 3 years ago

Remove some unneeded code in


(Core :: Widget: Cocoa, enhancement, P2)




Tracking Status
firefox64 --- fixed


(Reporter: mstange, Assigned: mstange)




(8 files)

Over the years, has accumulated some cruft related to painting. We've gone through many different ways to get pixels on the screen, and the code still expects to handle some of them even though they're no longer used. I'm planning to clean that up a bit.
Many years ago, Gecko would sometimes call nsChildView::Invalidate during drawRect:.
This is no longer the case: Widget invalidations now only happen outside of drawRect,
usually from a refresh tick or from viewWillDraw.
This was an experiment before we had e10s. It's no longer needed.

Depends on D7922
The main thread layer manager is always NONE, BASIC or CLIENT. It is never OPENGL anymore.
Main-thread OpenGL rendering was removed in bug 924403.

Depends on D7924
This override was intended to ignore unnecessary nsChildView::Invalidate calls
when using main thread OpenGL. With OMTC, Gecko no longer calls Invalidate in
those cases, it just composites on the compositor thread, and the widget's main
thread code doesn't really hear about it. So this workaround is no longer necessary.

Depends on D7925
I don't think anybody has made use of this code in years.

Depends on D7927
This was separate because at some point in the past we were calling
-[ChildView drawRect:inContext:] from a separate draw-in-titlebar pass. That separate
pass was removed in bug 676241.

Depends on D7929
Blocks: 1491442
Our implementation of this method was removed in bug 1070710. I forgot to remove the declaration in that bug.
Priority: -- → P2
Pushed by
Remove setNeedsPendingDisplay infrastructure. r=spohl
Remove EventThreadRunner and the pref that enabled it. r=kats,spohl
Remove -[ChildView isUsingMainThreadOpenGL] and dependent code because it always returns NO. r=spohl
Remove -[ChildView setNeedsDisplayInRect:] override. r=spohl
Remove unneeded debugging code. r=spohl
Inline drawUsingOpenGL into drawRect:inContext: and tweak a comment. r=spohl
Inline -[ChildView drawRect:inContext:] into -[ChildView drawRect:]. r=spohl
Pushed by
Remove declaration of -[NSView _regionForOpaqueDescendants:forMove:]. r=spohl
You need to log in before you can comment on or make changes to this bug.