We schedule additional composites as long as there is a CompositeUntil timestamp. These composites need a special tag and shouldn't carry the tags of whatever led us to check the timestamps. In addition, we should add the ASYNC_IMAGE tag when GetAndResetWillGenerateFrame returns true even if some other reason led us to check it.
Depends on D142233
Differential Revision: https://phabricator.services.mozilla.com/D142234
Also differentiate between skipped composites (too many pending frames) and discarded composites (paused or no display list).
Differential Revision: https://phabricator.services.mozilla.com/D142232
APZCTreeManager::GetGeckoFixedLayerMargins() is also removed,
but the field mGeckoFixedLayerMargins is kept as it's used internally
in WebRender codepaths.
Differential Revision: https://phabricator.services.mozilla.com/D142292
This patch just assumes NS_COORD_IS_FLOAT is undefined (which in practice it
always is), and deletes dead code accordingly.
It's unlikely we'll migrate nscoord to float anytime soon, so this code isn't
serving much of a purpose at this point. If we do someday make that migration,
the code that this macro is guarding would only represent a small step in that
migration, anyway; and at that point we can start by adding back the code that
this patch is removing.
In the meantime, it's not worth keeping this complexity and the untested/dead
code in the tree.
Differential Revision: https://phabricator.services.mozilla.com/D142246
With this change, `has-scroll-linked-effect` flag won't persist so that we can
avoid choosing either the one-frame delayed scroll offset or the latest scroll
offset in cases where there's no longer effective scroll linked effect. It will
mitigate scroll jittering.
Differential Revision: https://phabricator.services.mozilla.com/D141457
When the max surface size is exceeded, the raster spatial node
for a given surface is adjusted in `get_surface_rects`. However
a locally cached variable of the old raster spatial node index
was being used as a parameter when creating the render task.
Instead, only retrieve the raster spatial node after the call to
`get_surface_rects`, ensuring that it gets the updated value.
Also add support to wrench reftests to set the maximum surface
size, so that we can exercise this code path in reftests.
Differential Revision: https://phabricator.services.mozilla.com/D142015
We protect the shaped-word cache in each font with a RWLock, so that multiple threads can
shape in parallel using cached data; only when a new entry needs to be cached will we need
to take a write lock.
(To improve clarity, this patch also constifys a bunch of methods that do not mutate the
font instance.)
Differential Revision: https://phabricator.services.mozilla.com/D141473
According to [1], `MFShutdown` will shutdown the media foundation for every other call of `MFStartup`, which means it's possible to shutdown the media foundation even if other components are still using that.
Therefore, we should consider make the media foundation alive when the first time any component wants to use it, and shutdown it when the whole process destroys.
We already did similar thing on the RDD process [2] so it makes sense to do it as well on other places. Especially considering we will move the MFT decoder into the RDD process in the future, we definitely don't want an encoder incorrectly shutdown the media foundation the decoder is using.
Also, it saves time to call `MFStartup` if the media foundation is already started.
[1] https://docs.microsoft.com/en-us/windows/win32/api/mfapi/nf-mfapi-mfshutdown
[2] https://searchfox.org/mozilla-central/rev/eeeba8183d3268e0d563c2becf9f4adc21a37368/dom/media/ipc/RDDParent.cpp#111,303,315
Differential Revision: https://phabricator.services.mozilla.com/D140757
The blob font tables in Moz2DImageRenderer are currently shared across all WebRender instances.
So if different blob fonts from different WebRender instances happen to share the same font keys,
in particular the same namespace, the font keys can thus accidentally collide and blob fonts can
end up getting shared across WebRender instances unintentionally.
To guard against this, we need to ensure that SharedFontResources is provided with a unique
namespace for the WebRender instance in which to allocate shared font keys so that collisions
can no longer occur.
Differential Revision: https://phabricator.services.mozilla.com/D141929
The blob font tables in Moz2DImageRenderer are currently shared across all WebRender instances.
So if different blob fonts from different WebRender instances happen to share the same font keys,
in particular the same namespace, the font keys can thus accidentally collide and blob fonts can
end up getting shared across WebRender instances unintentionally.
To guard against this, we need to ensure that SharedFontResources is provided with a unique
namespace for the WebRender instance in which to allocate shared font keys so that collisions
can no longer occur.
Differential Revision: https://phabricator.services.mozilla.com/D141929
With this change, `has-scroll-linked-effect` flag won't persist so that we can
avoid choosing either the one-frame delayed scroll offset or the latest scroll
offset in cases where there's no longer effective scroll linked effect. It will
mitigate scroll jittering.
Differential Revision: https://phabricator.services.mozilla.com/D141457
In CompositorBridgeParent::RecvAdoptChild(), NotifyChildCreated() is called before WebRenderBridgeParent::UpdateWebRender(). The NotifyChildCreated() updates sIndirectLayerTrees[child].mParent. It affects to WebRenderBridgeParent::GetRootCompositorBridgeParent().
In the UpdateWebRender(), WebRenderBridgeParent::ClearAnimationResources() is called. But in ClearAnimationResources(), OMTASampler is got from new CompositorBridgeParent. In this case, OMTASampler needs to be got from old CompositorBridgeParent.
Differential Revision: https://phabricator.services.mozilla.com/D141819
We protect the shaped-word cache in each font with a RWLock, so that multiple threads can
shape in parallel using cached data; only when a new entry needs to be cached will we need
to take a write lock.
(To improve clarity, this patch also constifys a bunch of methods that do not mutate the
font instance.)
Differential Revision: https://phabricator.services.mozilla.com/D141473
Chrome code should be able to rely on CSS pixel * devicePixelRatio =
device pixel.
Chrome code that cares about the override should use
BrowsingContext.overrideDPPX. We were exposing the no-override value in
WindowUtils but that's unneeded now.
Differential Revision: https://phabricator.services.mozilla.com/D141323
This patch just adds the plumbing to allow for baked in blocklist rules
or the downloadable blocklist to prevent certain configurations from
getting WebGPU. It does not add any rules.
It also changes us from allowing WebGPU only in nightly, including
tests, to not release and not beta. This allows try to run the WebGPU
tests as expected, since even try builds forked from mozilla-central are
not considered nightly builds by CI (or so it seems).
Differential Revision: https://phabricator.services.mozilla.com/D141682
Unfortunately I couldn't verify this fix myself because the Android 13
image I got doesn't have the described fonts.xml change, nor the legacy
font in /system/fonts, but this should do.
Include the noto color fonts in the standard fonts for the legacy
codepaths too, and avoid a couple string copies and allocations while at
it.
Differential Revision: https://phabricator.services.mozilla.com/D141710
Replace the "fake" PlaceholderLock in gfxFontCacheExpirationTracker with an actual mutex,
in preparation for accessing the cache (and potentially retiring fonts from the main cache
to the expiration tracker) from worker threads.
Merge gfxFontCacheExpirationTracker into gfxFontCache instead of having it as a separately-
defined private base, which just clutters the code for no benefit.
Add an RWLock to guard the actual font-cache hashtable, to allow simultaneous read access
from multiple threads. We'll only need to take a write lock when updating the cache, but
most usage will just be looking up existing entries, so worker threads need not block each
other (or the main or stylo threads) to do that.
Differential Revision: https://phabricator.services.mozilla.com/D141472