Closed Bug 419125 Opened 16 years ago Closed 15 years ago

Remove DeviceContextImpl and nsRenderingContextImpl

Categories

(Core :: Graphics, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.2a1

People

(Reporter: reg, Assigned: reg)

References

Details

Attachments

(3 files, 4 obsolete files)

These two classes are now only used as base classes for nsThebesDeviceContext and nsThebesRendering context.  The attached patch rolls them into these two.

The only changes in behavior are to actually register the memory pressure observer and to make some of the methods of nsFontCache non-virtual, since there is no inheritance.  Well, these are the only two intended changes...  I've tested this on FreeBSD (posting from the build), but there shouldn't be problems on other platforms.

The Makefile changes might need a careful look, along with the includes.
You should request review by following the "Details" link for the attachment, changing the review dropdown to "?", and entering an email address or unique substring thereof.  For this patch, I'd recommend either "vladimir@pobox" or "pavlov@pavlov".
Attached patch Fix style and remove virtual functions. (obsolete) (deleted) — Splinter Review
Updated patch which makes more of the members non-virtual, fixes the white space and some other style bits to match nsThebes* and also removes the unused mWidgetSurfaceCache member from nsThebesDeviceContext.  Tested on FreeBSD and Windows.  I've tried to trim the makefile changes to their minimum, but haven't tried to clean up gfx/src/Makefile.in and gfx/src/shared/Makefile.in.

This should give a slight code size win, a slight performance win, less data and makes the code cleaner.
Attachment #305100 - Attachment is obsolete: true
Attachment #309606 - Flags: superreview?(vladimir)
Attachment #309606 - Flags: review?(vladimir)
Attached patch Refreshed patch against mozilla-central (obsolete) (deleted) — Splinter Review
This is a refreshed patch against mozilla-central.  I'm still getting used to hg, so I hope I didn't screw it up ;-)

Only change from previous is the removal of an extra include which got added at some point.
Assignee: nobody → reg
Attachment #309606 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #331592 - Flags: superreview?(vladimir)
Attachment #331592 - Flags: review?(vladimir)
Attachment #309606 - Flags: superreview?(vladimir)
Attachment #309606 - Flags: review?(vladimir)
Blocks: 430829
Attached patch Update to tip (obsolete) (deleted) — Splinter Review
Update this again to tip, which changed a few things for @font-face.  I've been using this patch for a while with no ill effects (passes reftests and mochitests on all platforms).
Attachment #331592 - Attachment is obsolete: true
Attachment #350537 - Flags: superreview?(vladimir)
Attachment #350537 - Flags: review?(vladimir)
Attachment #331592 - Flags: superreview?(vladimir)
Attachment #331592 - Flags: review?(vladimir)
Sorry this has been kicking around for so long -- I'm happy to have this land, but for 1.9.2; we should be branching 1.9.1 soon (week at the most) and can start doing all the cleanup on the trunk then.
Flags: wanted1.9.2+
Product: Core → Core Graveyard
Attached patch Part 1 - Minor cleanup (deleted) — Splinter Review
Two small fixes - set the memory pressure observer and remove an unused variable...  Probably should file separate bugs for these...
Attachment #350537 - Attachment is obsolete: true
Attachment #371333 - Flags: superreview?(vladimir)
Attachment #371333 - Flags: review?(vladimir)
Attachment #350537 - Flags: superreview?(vladimir)
Attachment #350537 - Flags: review?(vladimir)
Attached patch Part 2 - nsDeviceContextImpl (deleted) — Splinter Review
Part 2 - Remove nsDeviceContextImpl, and make the nsFontCache class local and non-virtual.  This could be cleaned up more, but we should probably do unused methods first, then look to remove cruft.
Attachment #371334 - Flags: superreview?(vladimir)
Attachment #371334 - Flags: review?(vladimir)
Attachment #371333 - Flags: superreview?(vladimir)
Attachment #371333 - Flags: superreview+
Attachment #371333 - Flags: review?(vladimir)
Attachment #371333 - Flags: review+
Attachment #371334 - Flags: superreview?(vladimir)
Attachment #371334 - Flags: superreview+
Attachment #371334 - Flags: review?(vladimir)
Attachment #371334 - Flags: review+
Comment on attachment 371334 [details] [diff] [review]
Part 2 - nsDeviceContextImpl

I am terrified, but let's do it!
Component: GFX → GFX: Thebes
Product: Core Graveyard → Core
QA Contact: general → thebes
Target Milestone: --- → mozilla1.9.2a1
Attached patch Part 3 - nsRenderingContextImpl (deleted) — Splinter Review
Part 3 - Remove nsRenderingContextImpl.  Could also do with more cleanup, but unused methods should be removed first.

I've built these three patches on all major platforms, and tested on Win/Linux.  I could run a try server run now that I have commit rights...
Attachment #371337 - Flags: superreview?(vladimir)
Attachment #371337 - Flags: review?(vladimir)
Comment on attachment 371337 [details] [diff] [review]
Part 3 - nsRenderingContextImpl

Yeah, throw all these onto the tryserver first.
Attachment #371337 - Flags: superreview?(vladimir)
Attachment #371337 - Flags: superreview+
Attachment #371337 - Flags: review?(vladimir)
Attachment #371337 - Flags: review+
This is failing leak tests at least on mac, due to triggering an assert:

  ASSERTION: device context is initialized twice!: '!mInitialized', file /builds/slave/mozilla-central-macosx-debug/build/gfx/src/thebes/nsThebesDeviceContext.cpp, line 753

I'd paste in the stack too, but it's pretty bogus due to not having been run through fix-macosx-stack.  It's at the end of http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1239216265.1239218893.28973.gz if someone wants to look.
I removed the assert in changeset 6386025d72c3, and added a comment to bug 482928.  I'm not sure if I should add a dependency...
Depends on: 509244
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: