It seems that GCC, under certain circumstances, does not completely inline code in the skvx namespace in Skia, even though the code specifies "always_inline". As a side-effect, it leaves around symbols that are generated with different architecture flags supplied. LTO then picks one of the symbols, at what may as well be random.
This could potentially be an issue under clang if it ever failed to inline.
As a workaround for both, we force skvx to exist in arch-specific namespaces, i.e. -Dskvx=skvx_foo, so that even in the worst case, no ambiguous symbols will be generated.
Differential Revision: https://phabricator.services.mozilla.com/D182855
This transitions generate_mozbuild to python3, since the existing script was
bitrotted with python2.
The generated moz.build is also fixed up for the new Skia files.
Differential Revision: https://phabricator.services.mozilla.com/D173323
This transitions generate_mozbuild to python3, since the existing script was
bitrotted with python2.
The generated moz.build is also fixed up for the new Skia files.
Differential Revision: https://phabricator.services.mozilla.com/D173323
This transitions generate_mozbuild to python3, since the existing script was
bitrotted with python2.
The generated moz.build is also fixed up for the new Skia files.
Differential Revision: https://phabricator.services.mozilla.com/D173323
While Firefox builds for Android ARMv7 don't support non-NEON
processors, downstreams (including non-Android ones) may still want to
support them.
On the Firefox builds that don't support non-NEON processors, the NEON
flags are actually already passed globally, and they don't need to be
explicitly added. NEON_FLAGS is actually only meant to be used for
sources that specifically need NEON support even when the target doesn't
support it, for, e.g. specialized code behind runtime CPU detection.
So removing NEON_FLAGS is a no-op in practice when NEON processors are
already targeted.
Differential Revision: https://phabricator.services.mozilla.com/D172801
This applies a fix that is present in Skia's HW luminosity blend mode to its
CPU pipeline so that the luminosity mode no longer divides by zero, thus avoiding
infs and nans.
Differential Revision: https://phabricator.services.mozilla.com/D149030
This applies a fix that is present in Skia's HW luminosity blend mode to its
CPU pipeline so that the luminosity mode no longer divides by zero, thus avoiding
infs and nans.
Differential Revision: https://phabricator.services.mozilla.com/D149030
-Wshadow warnings are not enabled globally, so these -Wno-shadow suppressions have no effect. I had intended to enable -Wshadow globally along with these suppressions in some directories (in bug 1272513), but that was blocked by other issues.
There are too many -Wshadow warnings (now over 2000) to realistically fix them all. We should remove all these unnecessary -Wno-shadow flags cluttering many moz.build files.
Differential Revision: https://phabricator.services.mozilla.com/D132289
sk_sp requires its type to be defined at the point of sk_sp declaration.
Just use RefPtr instead which does not have this limitation so we can move
some Skia includes out of the Moz2D headers.
Differential Revision: https://phabricator.services.mozilla.com/D130387
sk_sp requires its type to be defined at the point of sk_sp declaration.
Just use RefPtr instead which does not have this limitation so we can move
some Skia includes out of the Moz2D headers.
Differential Revision: https://phabricator.services.mozilla.com/D130387
It would seem that the Microsoft implementation of GetRecommendedRenderingMode
is somewhat different from the WINE version and has further behavior of also
checking whether the font is hinted in the fallback case to determine if it
should truly default to natural rendering instead of natural symmetric. This
adds the hinting check to decide between natural or natural symmetric in that
fallback case.
Differential Revision: https://phabricator.services.mozilla.com/D129360
This attempts to emulate the behavior of GetRecommendedRenderingMode without
actually calling it. In addition, it allows some Gecko-specific behavior
like overriding the render mode explicitly that allows some simplification
of the decision-making.
Inside GetRecommendedRenderingMode, natural is only allowed if <= 20 size.
This allows us to thus decide mostly based on whether the size is > 20 or
if an explicit mode was specified. In the remaining case where we need
to check a GASP table if available, we defer to the symmetric flag. If
there is no GASP, we assume natural.
Differential Revision: https://phabricator.services.mozilla.com/D122025
This uses SkDraw::ComputeResScaleForStroking to ensure we exactly match the resolution scale
that is chosen for drawing the stroked path inside the guts of Skia. This should ensure these
two don't get out of sync.
This also cleans out the old overscale code in ComputeResScaleForStroking that was necessary
during an ancient Skia porting effort but has now bitrotted into irrelevance.
Differential Revision: https://phabricator.services.mozilla.com/D101686
We should be able to use CTFontCreateCopyWithAttributes for non-system fonts
because we don't need to worry about them changing. This avoids the leaks
caused by going through a CGFont.
Differential Revision: https://phabricator.services.mozilla.com/D94772