This patch doesn't change user-visible behavior, other than an anticipated
slight performance improvement.
The preallocation sizes here are intended to be relatively small to avoid
wasting stack space, but they're large enough to avoid reallocation churn here
during a run of the Speedometer 3 benchmark.
Differential Revision: https://phabricator.services.mozilla.com/D168000
[Int]CoordTyped no longer inherits Units because otherwise
instances of [Int]IntPointTyped may get one Base subobject because
it inherits Units, and others because of BasePoint's Coord members,
which end up increasing the [Int]CoordTyped's objects size (since
according to the ISO C++ standard, different Base subobject are
required to have different addresses).
Differential Revision: https://phabricator.services.mozilla.com/D160713
This patch doesn't impact behavior.
The new const annotations will help to simplify reasoning about these various
helper classes & what states they could possibly be in.
Differential Revision: https://phabricator.services.mozilla.com/D160695
This patch doesn't impact behavior; it's just adding an annotation to activate
a static analysis check for various classes.
The annotation gives us some confidence that these instances are tightly scoped
to a particular function-call. This helps reduce concerns about to-what-extent
the affected classes might need to worry about the lifetimes of the objects
pointed to by their member-vars.
The specific classes I'm annotating are:
- gfxTextRunDrawCallbacks and PaintTextParams, both of which have multiple
subclasses, all of which will automatically inherit this annotation and
benefit from it.
- TextFrameIterator and CharIterator, two local utility classes in
SVGTextFrame.cpp.
Differential Revision: https://phabricator.services.mozilla.com/D160694
This patch shouldn't change behavior.
This lets us remove the rarely-used no-arg constructor for gfxSkipCharsIterator
in the next patch. (That constructor was an alternate representation of an
invalid gfxSkipCharsIterator; but the Maybe<> representation added here makes
things a bit easier to reason about.)
Differential Revision: https://phabricator.services.mozilla.com/D159902
This accelerates web-exposed SVG APIs such as getExtentOfChar() by avoiding the expensive
MeasureText() call when we're just getting the line-height metrics.
Differential Revision: https://phabricator.services.mozilla.com/D145717
This aims to prevent an O(n^2) performance situation when per-glyph
positioning is in use.
This reduces the time to load the testcase here from around 70s to 17s
in my local build. Still not great, but at least it's less of a disaster.
Differential Revision: https://phabricator.services.mozilla.com/D145631
This accelerates web-exposed SVG APIs such as getExtentOfChar() by avoiding the expensive
MeasureText() call when we're just getting the line-height metrics.
Differential Revision: https://phabricator.services.mozilla.com/D145717
This aims to prevent an O(n^2) performance situation when per-glyph
positioning is in use.
This reduces the time to load the testcase here from around 70s to 17s
in my local build. Still not great, but at least it's less of a disaster.
Differential Revision: https://phabricator.services.mozilla.com/D145631
This makes TransformPoint and TransformRect deal with SVG text
correctly. We need TransformPoint support so that GeometryUtils works as
expected, since we need to transform the points individually so that
stuff like transforms report the expected result (a rect doesn't cut it
for those).
Differential Revision: https://phabricator.services.mozilla.com/D135152
Backs out bug 1599173 which landed in Firefox 72. The pref has been enabled since bug 1600855 which landed in Firefox 73
Differential Revision: https://phabricator.services.mozilla.com/D106731