This is specifically needed because the new test I'm adding uses both
pinchZoomInWithTouch and forceLayerTreeToCompositor, and it seems hard/impossible
to make that work unless both are async functions or both are non-async generator
functions. And in general I think we want to move away from the generator-style
tests and towards async-style tests as they are cleaner and more flexible. So
this migrates helper_basic_zoom along with turning pinchZoomInWithTouch into
an async function.
Depends on D76813
Differential Revision: https://phabricator.services.mozilla.com/D76814
This is the main fix for the bug. When APZ is getting metrics from the main
thread "for the first time" it should accept the visual scroll offset in the
main thread metrics. Normally one would expect the isFirstPaint flag to be
set on this call to NotifyLayersUpdated, but that seems to only ever be set
on the very first paint of a presShell. In particular it is not set after a
tabswitch because the brower's async tab switching mechanism means that the
layer tree is already cached in the compositor.
Differential Revision: https://phabricator.services.mozilla.com/D76812
SetScrollableFrameMetrics uses a bogus scrollable rect (-1, -1, -1, -1) if none
is provided. With the next patch, we start using this bogus rect for clamping
the scroll offset on some calls to NotifyLayersUpdated, and causes the gtest
to fail. If we provide some sane rect it all works fine.
Depends on D76810
Differential Revision: https://phabricator.services.mozilla.com/D76811
- Add a gfxVarReceiver for nsCSSProps.
- Recompute backdrop-filter state when notifying receivers for WebRender.
- Remove NS_NewRunableFunction calls when we know we're on main thread.
- Add assertion that recompute enabled state is called from main thread.
Differential Revision: https://phabricator.services.mozilla.com/D74975
Bug 1620014 attempted to fix an issue where an animated visual
viewport offset (eg due to scrolling while being zoomed in) was
causing the fractional offset of a descendant scroll frame's content
transform to change, causing too much picture cache invalidation.
It did so by snapping the coordinate-system-relative offset when using
it to calculate the content_transform. This value of course includes
the animated visual viewport offset (as the axis-aligned zoom
transform cannot reset the coordinate system). However, it also
includes non-animated offsets, which were now being incorrectly
snapped, causing blurry/clipped text.
This change reverts that original fix. And instead, it snaps the
source_transform of the reference frame itself when it is sampled,
rather than the accumulated coordinate-system-relative scale_offset of
the scroll frame. Additionally, it only snaps the offset if it is an
animation (including zoom), and static offsets are left unsnapped.
Differential Revision: https://phabricator.services.mozilla.com/D76298
There's no use case for stateful comparators, so they can be just plain
function pointers.
This is used in some hot places like CSS selector matching.
Differential Revision: https://phabricator.services.mozilla.com/D77084
If |nsDisplayItem::CreateWebRenderCommands()| returns false, the items that have been pushed to |DisplayListBuilder::pending_chunk| need to be cleared, because the item will be pushed as an image instead. This happens, for example, when nsDisplayText encounters unsupported features.
Differential Revision: https://phabricator.services.mozilla.com/D77095
This is the logic of tracing the WebGPU API calls at the level of wgpu-core,
serialized into a folder of choosing on the user drive. Traces are extremely portable,
they can be shared (on BugZilla) and then replayed on the developer machine,
which can have a different architecture from the users machine.
The standalone player is introduced in `gfx/wgpu/player`, similar to WebRender's Wrench.
The output dir is controlled by "dom.webgpu.traceDir" pref. No tracing happens if it's empty.
Differential Revision: https://phabricator.services.mozilla.com/D73333
We've already tried to looking up the existing AnimatedValue so that when we
want to replace the old one in the hash table we can reuse the existing one.
With this manner, we no longer need to copy TransformData if we don't need to
do.
Differential Revision: https://phabricator.services.mozilla.com/D76633
This is the logic of tracing the WebGPU API calls at the level of wgpu-core,
serialized into a folder of choosing on the user drive. Traces are extremely portable,
they can be shared (on BugZilla) and then replayed on the developer machine,
which can have a different architecture from the users machine.
The standalone player is introduced in `gfx/wgpu/player`, similar to WebRender's Wrench.
The output dir is controlled by "dom.webgpu.traceDir" pref. No tracing happens if it's empty.
Differential Revision: https://phabricator.services.mozilla.com/D73333
This should fix a memory usage regression from a9eaeeec41 which I suspect was caused by not clearing the blob's namespace anymore after destroying the api object.
Depends on D76489
Differential Revision: https://phabricator.services.mozilla.com/D76490
With current gecko, there are cases that compositor window is used even when it is not necessary. For example, fallback from DirectComposite with WebRender and fallback from double buffering with Compositor. With some gpu drivers, the fallbacks with compositor window causes rendering problem.
Differential Revision: https://phabricator.services.mozilla.com/D76470
In favor of the NativeAnonymous versions which they forward to.
Done automatically with:
rg -l 'IsInAnonymousSubtree' | xargs sed -i 's/IsInAnonymousSubtree/IsInNativeAnonymousSubtree/g'
And removing the function definitions afterwards.
Differential Revision: https://phabricator.services.mozilla.com/D76681
The scroll position and scrollable rect are inside the zoom boundary so we need to use the composisted size inside the zoom boundary as well.
Differential Revision: https://phabricator.services.mozilla.com/D76089
WR may be sanitizing more fonts than just downloadable webfonts (any for
which we couldn't generate a descriptor), so we need to be more permissive
about what font types we allow that the content process would normally skip.
Differential Revision: https://phabricator.services.mozilla.com/D76608
Also, add `clang-format off` directives to files which are ignored by
.clang-format-ignore so that the editor isn't trying to reformat them
Differential Revision: https://phabricator.services.mozilla.com/D76217
EGL with buffer-age requires the application to keep the front buffer
fully consistent. This means we have to draw the previous frame's
damage as well. (But we don't need to include it in the hint we're
sending to the system compositor via SwapBuffersWithDamage.)
Differential Revision: https://phabricator.services.mozilla.com/D61062
By using RenderTextureHostWrapper, we could reduce re-creation of RenderDXGITextureHostOGL and RenderDXGIYCbCrTextureHostOGL.
Differential Revision: https://phabricator.services.mozilla.com/D74838