Calling RemoteTextureTxnScheduler::NotifyTxn() of main thread canvas is deferred to WebRenderAPI for waiting RemoteTextureOwner at WebRenderAPI.
When RemoteTextureOwner is not registered yet, WaitingTextureOwner is used to register the callback. WaitingTextureOwner is removed in RemoteTextureMap::SuppressRemoteTextureReadyCheck() when it still exists.
Removing sync wait of off main thread canvas is going to be handled by another bug.
Differential Revision: https://phabricator.services.mozilla.com/D209647
This is preparation for Bug 1868927.
By deferring ApplyAsyncImageForPipeline() for TextureHost in AsyncImagePipeline of synchronous WebRenderImageHost, ApplyAsyncImageForPipeline() can be called after the RemoteTextureHostWrapper is in the ready state.
Differential Revision: https://phabricator.services.mozilla.com/D197320
This is preparation for Bug 1868927.
By deferring ApplyAsyncImageForPipeline() for TextureHost in AsyncImagePipeline of synchronous WebRenderImageHost, ApplyAsyncImageForPipeline() can be called after the RemoteTextureHostWrapper is in the ready state.
Differential Revision: https://phabricator.services.mozilla.com/D197320
The APZ minimap is a debugging tool for Firefox developers, which can
be enabled with the pref apz.minimap.enabled.
When enabled, it shows a minimap overlay for every scroll frame, with
rects indicating the layout and visual viewports and the displayport.
We previously had an implementation for Layers that was removed when
Layers was removed. This patch is restoring an equivalent feature,
implemented for WebRender.
Differential Revision: https://phabricator.services.mozilla.com/D190720
When root API is not used, the transaction could be delayed at WebRenderAPI::SendTransaction(). When sending transaction related to ImageBridge, we do not want the delay.
Differential Revision: https://phabricator.services.mozilla.com/D195751
In current m-c, async RemoteTexture wait at RenderThread stops window update when the wait is too long. If async RemoteTexture is handled by WebRenderAPI, window could be updated during long async RemoteTexture wait.
async RemoteTexture wait of root WebRenderBridgeParent are disabled to simplify WebRenderAPI's wait handling.
offscreen canvas case is handled by WebRenderImageHost by Bug 1827578.
Differential Revision: https://phabricator.services.mozilla.com/D175590
This prevents copies and avoids the hack we have to avoid this, which
right now is using nsDependent{C,}String.
Non-virtual actors can still use `nsString` if they need to on the
receiving end.
Differential Revision: https://phabricator.services.mozilla.com/D152519
## Summary
Pass the fixed position element animation id through webrender, returning the
the animation id in the hit-test result if the element is a fixed position
element. This animation id then can be used to lookup the relevant Hit-Testing
Tree Node, which can be used to find the fixed (or sticky) position side bits.
## Motivation
Sticky content can be currently stuck to the root content or not, based on the
scroll position. As a result, when hit testing sticky content, APZ needs both
the sticky position side bits and additional information to determine if the
element is currently stuck to the root content. This is needed to fix the
hit-testing of sticky position content when a APZ transform is being applied,
such as overscroll and hiding the dynamic toolbar.
## Implementation
The information needed to determine if a element is currently stuck to the root
content and the fixed/sticky position side bits is already stored in the
hit-testing tree node. Any hit test result should have a corresponding
hit-testing tree node entry. When a hit-test result contains a animation id and
a hit-testing tree node is found, we can store a pointer to this node and use
this to check the fixed/sticky position side bits. Something similar is already
done for hit test results when a scrollbar is hit.
Differential Revision: https://phabricator.services.mozilla.com/D148648
Although not needed right now (checkerboarding backgrounds get
a slice anyway due to being a different scroll root), this will
be important for the upcoming work to make backdrop filter
roots implicit. This allows WR to know when slicing up a content
slice if the prim is relevant to the backdrop root.
Differential Revision: https://phabricator.services.mozilla.com/D146145
P010 is trivially the same as NV12, but the 10-bit colors are packed into
the most significant bits instead of the least significant bits. This changes
the yuv shader to use the correct packing for P010. It treats P010 as its
own yuv format, which requires a lot of scaffolding.
Differential Revision: https://phabricator.services.mozilla.com/D140422
We need them for SVG primitives.
This patch adds a bit of plumbing to disable snapping some of the primitives and forcing the antialiasing shader feature where needed, and uses it for SVG solid rectangles and images.
Differential Revision: https://phabricator.services.mozilla.com/D139024
This change mitigates the gap between the external_scroll_offset informed from
the main-thread and scroll_offset informed from APZ.
Some wrench reftests for this change are in the next commit.
Differential Revision: https://phabricator.services.mozilla.com/D133444
Depends on D136163
I have a feeling this isn't exactly the right way to pass this info, since the old WR code must have known about the perspective node without using my new flag.
Differential Revision: https://phabricator.services.mozilla.com/D136180
This includes some other changes;
1) Rename relevant functions
scroll_node_with_id -> set_scroll_offset
scroll_node -> set_scroll_offset
set_scroll_origin -> set_scroll_offset
2) Drop ScrollClamping argument
In Gecko we didn't use ScrollClamping::ToContentBounds at all
3) The order of arguments of scroll_node_with_id
Differential Revision: https://phabricator.services.mozilla.com/D133145
The default size on most platforms is 256*256 which corresponds to the default blob tile size. I didn't check on android so I set it to 512*512 above which we never batch the upload so that the behavior is unchanged, but I suspect that a smaller threshold like 256*256 would also work better there.
On Windows with heavy blob image workloads, not batching gives a 20%-30% improvement to the time spent in update_texture_cache.
Differential Revision: https://phabricator.services.mozilla.com/D129516
This patch adds plumbing to keep track of why we request frames to be rendered.
This information is then displayed in gecko profile markers on the renderer thread as well as in profiler HUD counters (See "Render reasons" in profiler.rs).
Differential Revision: https://phabricator.services.mozilla.com/D127274
Right now adding a dynamic pref for webrender involves plumbing in gfxPlatform, gfxVars, CompositBridgeParent, WebRenderBridgeParent, WebRenderAPI, the bindings, and then messaging the pref change to the right thread in WebRender.
That's quite a bit time consuming for something we tend to do for multiple things.
We already have a pretty good system for boolean debug prefs where the pref only needs to be listed in gfxPlatform and in the DebugPref enum of webrender_api/lib.rs, which has led us to use it for non-debug purposes.
This patch adds a system similar to the DebugFlags with values passed in a bitfield to be able to use gfxVars. In WebRender the parameters are key-value pairs which flow through the pipeline so that any component can react to them. A followup will add integer parameters.
The patch also moves a few prefs to this system and adds a pref to use PBO uploads.
Differential Revision: https://phabricator.services.mozilla.com/D126100
The prefs name is gfx.webrender.blob-tile-size and can be changed at runtime.
It changes the behavior of a wrench reftest that was ensuring that we don't crash with unreasonable tile sizes. The new behavior (sanitizing the tile size) means we can render the image while we would previously skip it.
Differential Revision: https://phabricator.services.mozilla.com/D124789
Fix a bug where the display item cache was not being reused from
frame to frame with retained display list builders.
At the same time, make the capacity recycling on the display list
serialization arrays a bit more realistic.
Differential Revision: https://phabricator.services.mozilla.com/D124412
In order to support scroll-linked animations, we need the scrolling
information for sampling omt animations, so we would like to do APZ animations
first.
Now we clear the dynamic properties before sampling APZ and OMTA, so we
can make sure the pending properties are empty before appending new
ones. Therefore, let's just replace set_properties with add_properties
because OMTA sampler shouldn't override the current pending properties which
may be added by APZ sampler.
Differential Revision: https://phabricator.services.mozilla.com/D122308
In order to support scroll-linked animations, we need the scrolling
information for sampling omt animations, so we would like to do APZ animations
first.
Now we clear the dynamic properties before sampling APZ and OMTA, so we
can make sure the pending properties are empty before appending new
ones. Therefore, let's just replace set_properties with add_properties
because OMTA sampler shouldn't override the current pending properties which
may be added by APZ sampler.
Differential Revision: https://phabricator.services.mozilla.com/D122308
This will allow storing state in a display list builder struct
between different display list builds. In time, this will be used
to reduce the size of the serialized display list data, by only
sending delta changes to WR. The extra information made available
by sending deltas will then allow WR to more efficiently cache and
reuse information across different scene/frame builds.
Differential Revision: https://phabricator.services.mozilla.com/D123579
Add an interface (and update Gecko to provide) a stable unique
identifier for each spatial node that is consistent across
display lists.
Although this patch doesn't _do_ anything useful with this yet,
we'll use this in future to allow interning, persisting and caching
a lot more information related to primitives and clips.
For now, it just asserts that the calling code never supplies a
duplicate unique identifier - which will be useful to have running
in nightly for a couple of weeks before starting to make use of
these identifiers.
Differential Revision: https://phabricator.services.mozilla.com/D123177
This will allow experimenting with different representations of
the spatial tree (such as interning and/or providing stable
indices during display list building). It may also simplify
future changes to the public API to expose the spatial tree
directly.
As part of these changes, refactor how the debug representation
for the capture format is (de)serialized, to make it simpler to
add different payload vector types in future.
Differential Revision: https://phabricator.services.mozilla.com/D122183