In `gfx/config/gfxFeature.{h,cpp}`, it can be observed that a `mozilla::gfx::FeatureState` is
a state machine that collects different "levels" of enabled-ness. To summarize[^1], these are:
1. Default
2. User
3. Environment
4. Runtime
The rules for initializing each of these layers are basically that:
1. At least (1) must be initialized, otherwise, the feature is "unused".
2. Other levels may only be initialized (or re-initialized) if (a) all previous levels were
initialized, and (b) no subsequent levels are initialized. Otherwise, throw an assertion
error.
In the bug we're fixing here, we were attempting to configure the environment level before the user
level, which violates rule 2. Oops! Make sure we init the user level before initting the
environment level.
[^1]: You can find a better description of the intent of each layer at <https://searchfox.org/mozilla-central/rev/75da1dd5d4b9b991f919a41594194eab93cdef62/gfx/config/gfxFeature.h#147-155>.
Differential Revision: https://phabricator.services.mozilla.com/D170764
- Get widget size in RenderCompositorSWGL::BeginFrame() and save it for further use. That prevents flickering/artifacts if compositor widget size is changed during rendering.
- Request full screen update when widget size changes on Wayland.
Differential Revision: https://phabricator.services.mozilla.com/D169905
To run webrender's wrench tests the app needs to read a file to parse
the command line args from, and write a file with the test
output. These files also need to be written and read manually over adb
by the engineer running the tests (or more likely by the
android_wrench.py script).
Currently we use the external data dir for these files. However, on
recent android versions these are no longer accessible to the app
without jumping through some hoops. This patch makes us instead use
the internal data dir. It also makes the app "debuggable" so that
these files can be written to via adb using run-as.
Additionally, we must ensure that the android_wrench.py script uses
run-as instead of root to push and pull the files, as root does not
have permission to do so on recent android versions.
Differential Revision: https://phabricator.services.mozilla.com/D169829
For programmatic scrolls, we should respect a users general.smoothScroll
preference. If smooth scrolls are disabled, programmatic scrolls with
behavior: "smooth" should be treated as instant programmatic scrolls.
Differential Revision: https://phabricator.services.mozilla.com/D170110
- Create wheel transactions for wheel events handled by APZ.
- Group wheel events with the current wheel transaction, so that all
wheel events in a wheel transaction are fired to the same element.
- Store the current event target for the first event in a wheel
transaction to be used for subsequent events.
- Add the dom.event.wheel-event-groups.enabled preference as a feature
flag for this behavior.
Differential Revision: https://phabricator.services.mozilla.com/D163484
Simplifies some upcoming work to change how we store these when
updating primitive dependencies during picture cache updates.
Differential Revision: https://phabricator.services.mozilla.com/D170546
It is unclear that we want it enabled for all users and this way we don't have to audit the changes in renderdoc-sys.
We can and should revisit this in the future if we feel like it would be useful to ship with webgpu+renderdoc integration.
Differential Revision: https://phabricator.services.mozilla.com/D170492
For programmatic scrolls, we should respect a users general.smoothScroll
preference. If smooth scrolls are disabled, programmatic scrolls with
behavior: "smooth" should be treated as instant programmatic scrolls.
Differential Revision: https://phabricator.services.mozilla.com/D170110
This patch adds two new prefs, gfx.webrender.scissored-cache-clears
.enabled and .force-enabled to control its status beyond the blocklist.
The former is true by default and allows one to turn the feature off by
flipping it to false. The latter allows one to force the feature on even
if the blocklist disables it. It also adds the status to the decision
log in about:support.
Differential Revision: https://phabricator.services.mozilla.com/D170507
This change makes the VIDEO_LOG only output the first surface sent to a
video layer (whether an AVSampleBufferDisplayLayer or a CALayer), and
notes whenever the video layer has been recreated. This will be helpful in
diagnosing cases degenerate cases where display of video content toggles
between a specialized video layer and a normal layer.
Differential Revision: https://phabricator.services.mozilla.com/D170154
- Get widget size in RenderCompositorSWGL::BeginFrame() and save it for further use. That prevents flickering/artifacts if compositor widget size is changed during rendering.
- Request full screen update when widget size changes on Wayland.
Differential Revision: https://phabricator.services.mozilla.com/D169905
This patch exposes an unrelated issue that causes a performance regression.
For now, we'll revert this to get back to a normal baseline. Then, separately
fix the underlying code which regresses perf, then re-land this patch.
Revert "Bug 1811978 - Enable the new tiled rendering path, update test expectations r=gfx-reviewers,nical"
This reverts commit 7f3a2568aabf9fa2358fe0f7421042ba85a23442.
Differential Revision: https://phabricator.services.mozilla.com/D170399
This replaces CTFontManagerRegisterFontsForURLs, which is deprecated since macOS 10.15.
(No user-visible behavior change.)
Depends on D170287
Differential Revision: https://phabricator.services.mozilla.com/D170288
No user-visible behavior change; just trying to move a bit more work onto a secondary thread,
in the hope of improving startup perf (althogh if there's too much contention for disk i/o,
or not enough CPU cores available, it may not help much).
Depends on D170286
Differential Revision: https://phabricator.services.mozilla.com/D170287
Local testing indicates that if we don't do this, there's a risk that Core Text will resolve font names
differently in the content vs parent processes when duplicate fonts are installed (e.g. old versions of
Arial, Helvetica, etc that some users have "inherited" from ancient systems). The mismatched fonts used
for layout (in the content process) vs painting (by the parent) lead to the "garbled text" issue.
Unfortunately, this will impact content-process startup on macOS, so expect a perf regression report.
In my local testing, this appears to prevent the "garbled text" problem when an old version of Arial is
installed, or other similar font mismatch situations. There should be no user-visible behavior change
for systems with a "clean" font installation.
Differential Revision: https://phabricator.services.mozilla.com/D170286
This change computes the new invalid region of the in progress surface
during the partial update, and asserts that the update region is
sufficient to cover it. This will assert earlier than the asserts in
NotifySurfaceReady, under similar conditions. Hopefully this will help us
identify if we are using an incorrectly calculated update area.
Additionally, it reorganizes the region boolean logic in
NativeLayerCA::HandlePartialUpdate to avoid adding in the update region
just to subtract it away again.
It also confirms that callers to the layer are always either using the
drawn surface call (NotifySurfaceReady) or the external surface call
(AttachExternalImage).
Differential Revision: https://phabricator.services.mozilla.com/D169019
Forcing specialized video in this case was overriding the user's ability
to opt-out by setting the pref, while providing no benefit. Adding the
macOS version check around this makes our logic here consistent with our
setting of preventsCapture in ApplyChanges.
Differential Revision: https://phabricator.services.mozilla.com/D169849
This reverts the per-glyph-run optimization landed in bug 1816299, and replaces it with a per-glyph version
that will work within a long run of glyphs in a single font, as well as across the glyph runs in a mixed-font textrun.
To minimize the cost of the check, rather than retrieving individual glyph bounds, we use the overall font extents.
(Note that this uses the bounding box min/max coordinates from the 'head' table, which may exceed the typographic
ascent/descent of the font, and the advances of the glyphs; we care about the ink extents, not typographic size.)
Differential Revision: https://phabricator.services.mozilla.com/D170058
This seems tricky to test in CI as it doesn't reproduce consistently
(originally reported on Windows, but I haven't been able to reproduce it
there at all; but successfully repro'd and tested locally on Linux).
Differential Revision: https://phabricator.services.mozilla.com/D169935