Closed Bug 289982 Opened 20 years ago Closed 20 years ago

Disable unused methods DrawArc and FillArc in nsIRenderingContext (bloat)

Categories

(Core Graveyard :: GFX, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: engel, Unassigned)

Details

(Keywords: memory-footprint)

The methods |nsIRenderingContext::DrawArc| and |nsIRenderingContext::FillArc|
are never invoked.  The same applies for these methods in the subclasses of
nsIRenderingContext.

These methods, |DrawArc| and |FillArc|, should be temporarily disabled or
removed until they are used.

http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/gfx/public/nsIRenderingContext.h&rev=1.62&root=/cvsroot#456
In the long run, |DrawArc| and |FillArc| might become useful for implementing
the -moz-border-radius attribute.  The current implementation for drawing
rounded rectangles seems to be somewhat inefficient (it converts the arcs to
quadratic splines, then it converts the splines to polygons),
http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/layout/base/nsCSSRendering.cpp&rev=3.259&root=/cvsroot#3340

Also it is known that the "border radius code is rather hacky and will only work
for small radii"
http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/layout/base/nsCSSRendering.cpp&rev=3.259&root=/cvsroot#1836

This might be related to Bug 252241 and Bug 287472.
The gfx apis involved are on their way our anyway, as I understand... So unless
you're sure there are no embedders using these methods, I'd say removing them is
a little dangerous and not worth the effort.
WONTFIX, according to Boris' argument that this gfx API will become obsolete soon.

From http://wiki.mozilla.org/Mozilla2:GFXResearch, I found that arcs are planned
for the future API as well,
http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/gfx/thebes/public/gfxContext.h&rev=1.3&root=/cvsroot&mark=83-84#79
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → WONTFIX
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.