Closed Bug 912974 Opened 6 years ago Closed 6 years ago

Split two classes out of GLContext.h, and remove many #includes in GLContext.h

Categories

(Core :: Graphics, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla26

People

(Reporter: bjacob, Assigned: bjacob)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Bug 912042 was about having fewer people accidentally include GLContext.h. But there remains dozens of cpp files that include GLContext.h because they actually have to. The only way to speed that up is to make GLContext.h less expensive to include. I looked at making it #include fewer headers and it turned out that that was possible especially if we split a couple of auxilliary classes out of it. For example, <stack> was only needed for TextureGarbageBin, and "nsIMemoryReporter.h" was only needed for GfxTexturesReporter.

And then, there were the completely unneeded includes like <set>.

On try:
https://tbpl.mozilla.org/?tree=Try&rev=7ec397814580
Attachment #800126 - Flags: review?(jmuizelaar)
Also note that GetBitsPerTexel was only used for GfxTexturesReporter so it moves there and becomes static to that file. As opposed to being declared in GLContext.h and implemented in GLContextUtils.cpp.
Attachment #800126 - Flags: review?(jmuizelaar) → review+
http://hg.mozilla.org/integration/mozilla-inbound/file/e2f23b6aaf75
Assignee: nobody → bjacob
Target Milestone: --- → mozilla26
https://hg.mozilla.org/mozilla-central/rev/e2f23b6aaf75
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Comment on attachment 802571 [details] [diff] [review]
Forgot the include guards!

And I almost got credit for this patch too if I hadn't been paying attention! But seriously, please make sure you have Mercurial configured to include your name on your patches.
Attachment #802571 - Flags: checkin? → checkin+
Oops, not sure how it happened... I obviously do have mercurial configured and the patch on my hard drive currently does have my account info... mystery!
You need to log in before you can comment on or make changes to this bug.