Closed Bug 1228211 Opened 9 years ago Closed 8 years ago

Slim down nsRenderingContext

Categories

(Core :: Graphics, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla46
Tracking Status
firefox46 --- fixed

People

(Reporter: n.nethercote, Assigned: n.nethercote)

Details

Attachments

(2 files)

nsRenderingContext is pretty small, but it can be made even smaller.
This patch rearranges Paint() so that the next nsRenderingContext is created
via the one-arg constructor rather than via the zero-arg constructor + Init().
This means the SetLineWidth(1.0) call in Init() no longer occurs but that's ok;
it was redundant because 1.0 is the default line width in a new gfxContext.
Attachment #8692289 - Flags: review?(jwatt)
The following functions in nsRenderingContext are unused and this patch removes
them: the zero-arg constructor, the |DrawTarget*| constructor, and both Init()
functions.
Attachment #8692290 - Flags: review?(jwatt)
Comment on attachment 8692289 [details] [diff] [review]
(part 1) - Rearrange nsDisplayCanvasBackgroundImage::Paint()

Review of attachment 8692289 [details] [diff] [review]:
-----------------------------------------------------------------

Let's try a different reviewer.
Attachment #8692289 - Flags: review?(jwatt) → review?(dholbert)
Attachment #8692290 - Flags: review?(jwatt) → review?(dholbert)
Comment on attachment 8692289 [details] [diff] [review]
(part 1) - Rearrange nsDisplayCanvasBackgroundImage::Paint()

Review of attachment 8692289 [details] [diff] [review]:
-----------------------------------------------------------------

r=me
Attachment #8692289 - Flags: review?(dholbert) → review+
Comment on attachment 8692290 [details] [diff] [review]
(part 2) - Remove unused functions in nsRenderingContext

Review of attachment 8692290 [details] [diff] [review]:
-----------------------------------------------------------------

r=me
Attachment #8692290 - Flags: review?(dholbert) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/aa1f17e24472fd17c378be83600d3e324a404398
Bug 1228211 (part 1) - Rearrange nsDisplayCanvasBackgroundImage::Paint(). r=dholbert.

https://hg.mozilla.org/integration/mozilla-inbound/rev/2fb1d26fb62e12badb7a36da5acfdae2629d1d42
Bug 1228211 (part 2) - Remove unused functions in nsRenderingContext. r=dholbert.
https://hg.mozilla.org/mozilla-central/rev/aa1f17e24472
https://hg.mozilla.org/mozilla-central/rev/2fb1d26fb62e
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla46
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: