Closed
Bug 651021
Opened 14 years ago
Closed 10 years ago
Make nsRenderingContext a stack class
Categories
(Core :: Graphics, enhancement)
Core
Graphics
Tracking
()
RESOLVED
FIXED
mozilla36
People
(Reporter: zwol, Assigned: jwatt)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
57.77 KB,
patch
|
jrmuizel
:
review+
jwatt
:
checkin+
|
Details | Diff | Splinter Review |
nsRenderingContext is now a very thin shim around gfxContext; there's no good reason to allocate it on the heap anymore. It might at this point also make more sense if it lived in layout/base rather than gfx/src.
Comment 1•13 years ago
|
||
Honestly, I'd almost rather it go away entirely.
Reporter | ||
Comment 2•13 years ago
|
||
I wouldn't mind seeing it go away entirely, but I am not going to have time to do that patch, whereas I might have time to do this one.
Assignee | ||
Comment 3•10 years ago
|
||
Fixing this makes it easier to fix bug 1088760, since we can then convert the code piecemeal and wrap gfxContexts up in in-the-stack nsRenderingContexts at arbitrary points without worrying about allocation overhead.
Assignee: zackw → jwatt
Blocks: 1088760
Assignee | ||
Comment 4•10 years ago
|
||
Attachment #8513898 -
Flags: review?(bjacob)
Assignee | ||
Comment 5•10 years ago
|
||
Added MOZ_STACK_CLASS locally.
Assignee | ||
Comment 6•10 years ago
|
||
This passes Try BTW.
https://treeherder.mozilla.org/ui/#/jobs?repo=try&revision=1a8a85fb333b
Comment 7•10 years ago
|
||
Comment on attachment 8513898 [details] [diff] [review]
patch
Review of attachment 8513898 [details] [diff] [review]:
-----------------------------------------------------------------
I feel that I'm the wrong reviewer, because I've never dealt with nsRenderingContext at all, so I could be missing basic facts about it. Try :jrmuizel or :mattwoodrow.
Attachment #8513898 -
Flags: review?(bjacob)
Assignee | ||
Updated•10 years ago
|
Attachment #8513898 -
Flags: review?(jmuizelaar)
Comment 8•10 years ago
|
||
Comment on attachment 8513898 [details] [diff] [review]
patch
Review of attachment 8513898 [details] [diff] [review]:
-----------------------------------------------------------------
::: gfx/src/nsRenderingContext.h
@@ +16,5 @@
> class DrawTarget;
> }
> }
>
> class nsRenderingContext MOZ_FINAL
Would MOZ_STACK_CLASS be appropriate here?
::: layout/printing/nsPrintEngine.cpp
@@ +2264,5 @@
> fprintf(fd, "Title: %s\n", docStr.get());
> fprintf(fd, "URL: %s\n", urlStr.get());
> fprintf(fd, "--------------- Frames ----------------\n");
> + //nsRefPtr<gfxContext> renderingContext =
> + // mPrt->mPrintDocDC->CreateRenderingContext();
Should these lines go away?
@@ +3809,5 @@
> fprintf(fd, "URL: %s\n", aURLStr?aURLStr:"");
> fprintf(fd, "--------------- Frames ----------------\n");
> fprintf(fd, "--------------- Frames ----------------\n");
> + //nsRefPtr<gfxContext> renderingContext =
> + // aDC->CreateRenderingContext();
Same here
Attachment #8513898 -
Flags: review?(jmuizelaar) → review+
Assignee | ||
Comment 9•10 years ago
|
||
Thanks!
(In reply to Jeff Muizelaar [:jrmuizel] from comment #8)
> Would MOZ_STACK_CLASS be appropriate here?
Indeed, see comment 5.
As for the commented out lines, probably, but I don't know and I don't care to investigate much (lots of better things to do).
Assignee | ||
Comment 10•10 years ago
|
||
Comment on attachment 8513898 [details] [diff] [review]
patch
https://hg.mozilla.org/integration/mozilla-inbound/rev/097629b2eb2a
Attachment #8513898 -
Flags: checkin+
Comment 11•10 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
You need to log in
before you can comment on or make changes to this bug.
Description
•