Implement a strategy suggested by Raymond Chen [0] for avoiding stack
overflow in library code: move the relevant work onto a temporary fiber
with a potentially arbitrary stack size.
Additionally, implement a cppunittest to test the fiber code.
[0] https://devblogs.microsoft.com/oldnewthing/20200601-00/?p=103815
_The Old New Thing_, "How can I expand my thread’s stack at runtime?"
(and several followup posts).
Differential Revision: https://phabricator.services.mozilla.com/D141521
The !mHBFace assertion here was (somewhat indirectly) pointing out that we
potentially leaked a gfxHarfBuzzShaper during font-size-adjust processing,
where (depending on the property value) we might end up creating a temporary
shaper to measure a character during metrics setup.
(A hypothetical AtomicUniquePtr<T> that we could use for fields like
gfxFont::mHarfBuzzShaper etc would have avoided this bug. Filed bug
1762633 about this.)
Differential Revision: https://phabricator.services.mozilla.com/D142712
The new icon is not channel-specific, but I've kept it in branding
since it's possible that we'll distinguish in the future.
Differential Revision: https://phabricator.services.mozilla.com/D142396
Standalone taskgraph doesn't have a 'verify_parameters' function as we can't
assume that parameters are documented in every consumer repo. By moving these
to proper verifications in util/verify.py, each consumer repo in standalone may
optional implement something for them or not (as they see fit).
Differential Revision: https://phabricator.services.mozilla.com/D142024
Currently all verifications loop over tasks in a taskgraph. Though there are
some miscellaneous verifications in generator.py for things like parameters and
attributes. These verifications are currently specific to Gecko and cannot be
ported to other repositories.
This patch refactors the verifications logic to enable adding other arbitrary
verifications that don't use the same parameter values that a normal task
verification does. This will allow us to move the Gecko specific verifications
out of 'generator.py', which will allow us to use the standalone taskgraph
version of it.
Differential Revision: https://phabricator.services.mozilla.com/D142023
This implements a new DrawTarget API call, DrawShadow. This can be used to draw
the shadow of a given Path and Pattern. Unlike DrawSurfaceWithShadow, this only
draws the shadow to simplify the resulting implementation. DrawTarget provides
a default implementation that will draw a blurred shadow to a transient surface
before handing it off to DrawSurfaceWithShadow, allowing existing DrawTarget
implementations to function without having to implement the new API at all.
Within DrawTargetWebgl, DrawShadow allows direct caching of the shadow in the
existing PathCache mechanism, unlike DrawSurfaceWithShadow which would usually
be called with different transient surfaces every time, even if the input
patterns actually matched.
CanvasRenderingContext2D is modified to call DrawShadow when only a shadow
needs to be applied without any filter. AdjustedTarget is modified to wrap
the necessary DrawTarget draw calls so they can be dispatched appropriately.
Since a lot of redundant shadow parameters are shared between DrawShadow and
DrawSurfaceWithShadow, and since a lot of consumers of these functions need
to also pass around these parameters, this also bundles these into a new
ShadowOptions structure to make this easier.
Differential Revision: https://phabricator.services.mozilla.com/D142026
Loading dictionaries is time consuming and must occur on the main thread. By
loading them lazily, we can hopefully spread these loads across multiple calls
rather than loading them all at once, which results in noticeable jank on
slower systems.
Differential Revision: https://phabricator.services.mozilla.com/D142558
This adds an mEnabled flag which is used to hide dictionaries from the
spellchecker rather than freeing them. Loading dictionaries is an expensive
process which must occur on the main thread. By retaining dictionaries in
memory, we avoid having to reload them. If the number of dictionaries in use
exceeds a set number (10), we'll attempt to free any disabled dictionaries to
avoid memory use growing indefinitely.
Differential Revision: https://phabricator.services.mozilla.com/D142557
Prior behavior for active tabs in an inactive app would have the process priority oom score of 15. Now it's set to a higher priority oom score of 11. This will increase priority for recently used tabs on apps and prevent Android from unloading them.
Differential Revision: https://phabricator.services.mozilla.com/D142386
There weren't that many uses of the existing typedef, so it seemed like
it might be worthwhile to just replace all uses of the previous typedef
with the stl-like one.
Differential Revision: https://phabricator.services.mozilla.com/D142705
Also allow configuring styles like zap and color. Clean up some unnecessary conditional rendering as Localized already handles that.
Differential Revision: https://phabricator.services.mozilla.com/D142673
Prior behavior for active tabs in an inactive app would have the process priority oom score of 15. Now it's set to a higher priority oom score of 11. This will increase priority for recently used tabs on apps and prevent Android from unloading them.
Differential Revision: https://phabricator.services.mozilla.com/D142386