Closed Bug 1496823 Opened 6 years ago Closed 6 years ago

Remove some unneeded code in nsChildView.mm

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
mozilla64
Tracking Status
firefox64 --- fixed

People

(Reporter: mstange, Assigned: mstange)

References

Details

Attachments

(8 files)

Over the years, nsChildView.mm 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 mstange@themasta.com:
https://hg.mozilla.org/integration/autoland/rev/34f52a304c52
Remove setNeedsPendingDisplay infrastructure. r=spohl
https://hg.mozilla.org/integration/autoland/rev/959084361b15
Remove EventThreadRunner and the pref that enabled it. r=kats,spohl
https://hg.mozilla.org/integration/autoland/rev/8848453f27af
Remove -[ChildView isUsingMainThreadOpenGL] and dependent code because it always returns NO. r=spohl
https://hg.mozilla.org/integration/autoland/rev/56dc11bab861
Remove -[ChildView setNeedsDisplayInRect:] override. r=spohl
https://hg.mozilla.org/integration/autoland/rev/d1d878123a68
Remove unneeded debugging code. r=spohl
https://hg.mozilla.org/integration/autoland/rev/408b8733a0a6
Inline drawUsingOpenGL into drawRect:inContext: and tweak a comment. r=spohl
https://hg.mozilla.org/integration/autoland/rev/c9da89f17cf9
Inline -[ChildView drawRect:inContext:] into -[ChildView drawRect:]. r=spohl
Pushed by mstange@themasta.com:
https://hg.mozilla.org/integration/autoland/rev/075201afc029
Remove declaration of -[NSView _regionForOpaqueDescendants:forMove:]. r=spohl
You need to log in before you can comment on or make changes to this bug.