gecko-dev/layout
Lee Salzman 0978159170 Bug 1829026 - Update CanvasTranslator to work with DrawTargetWebgl. r=aosmond
This adds the necessary infrastructure for CanvasTranslator to allocate DrawTargetWebgl
instead of just allocating TextureData, and to use RemoteTextureMap to handle sending
the DrawTargetWebgl frames to the compositor.

This optimizes snapshot transport to use fewer copies to and from shmems when we know
the snapshot contents can be sourced from a shmem.

This adds a blocking mechanism separate from deactivation so that existing DrawTargetWebgls
can continue processing events while denying further ones from being created in the event
that allocating further DrawTargetWebgls might cause problems, but so that we don't disrupt
canvases that are already in flight.

PersistentBufferProviderAccelerated still remains the buffer provider for the new setup,
but just allocates a single RecordedTextureData internally. Since DrawTargetWebgl already
does its own swap chain management internally, we do not want to use the multiple texture
client strategy that PersistentBufferProviderShared does.

This adds a fallback mechanism such that if DrawTargetWebgl allocation fails, a TextureData
is allocated instead that still sends results to RemoteTextureMap. This has the advantage
that we don't need to synchronously block in the content process to verify if acceleration
succeeded, as the costs of such blocking are rather extreme and we must still produce the
rendered frame to ensure the user sees the correct result if the speculative acceleration
failed. It then notifies the content process asynchronously via the refresh mechanism to
try to recreate a non-accelerated buffer provider when it is ready.

There is one additional hitch in RemoteTextureMap that we need to add a mechanism to deal
with the setup of the RemoteTextureOwner. When display list building initially needs to get
the remote texture, the RemoteTextureOwner might not exist yet. In this case, we need to add
a block to ensure we wait for that to occur so that we do not render an erroneous result.
Previously, this block was handled in ClientWebGLContext. Since that is no longer used,
the block must be reinstated somewhere else until a non-blocking mechanism for display list
building to proceed with a stub texture host wrapper can be implemented.

Currently this leaves the gfx.canvas.remote and gfx.canvas.accelerated prefs as separate
toggles rather than trying to lump everything into one mechanism. While this may be desirable
in the future, currently Direct2D remote canvas is a separate acceleration mechanism that
needs to co-exist with the WebGL acceleration, and so being able to toggle both on or off
for testing is desirable.

Differential Revision: https://phabricator.services.mozilla.com/D194352
2023-12-12 07:35:03 +00:00
..
base Bug 1869195 - Fix crash in [@ mozilla::PresShell::GetRootScrollFrame]. r=emilio 2023-12-11 10:45:19 +00:00
build Bug 1727526 - Have a Stringifyable base class. r=dom-storage-reviewers,janv 2023-12-11 15:17:12 +00:00
docs Bug 1847086 - Document that layout reftests have SpecialPowers access. r=botond 2023-08-15 00:20:54 +00:00
forms Bug 1364813 - Remove IsFrameOfType, use non-virtual checks. r=jwatt 2023-11-26 22:17:28 +00:00
generic Bug 1867784 - Force reflow all kids in the last column balancing reflow. r=layout-reviewers,dholbert 2023-12-10 03:16:55 +00:00
inspector Bug 1852149 Part 3 - Add margin rules to servo r=firefox-style-system-reviewers,emilio 2023-12-08 20:25:55 +00:00
ipc
mathml Bug 1519636 - Reformat recent changes to the Google coding style r=emilio,media-playback-reviewers,padenot 2023-12-04 10:09:36 +00:00
media
painting Bug 1868479 - Fix backdrop-filter with SVG filters r=dholbert 2023-12-07 14:35:13 +00:00
printing Bug 1869217. Don't use the @page rules that match the first page as the page defaults. r=emilio 2023-12-11 17:53:41 +00:00
reftests Bug 1829026 - Update CanvasTranslator to work with DrawTargetWebgl. r=aosmond 2023-12-12 07:35:03 +00:00
style Bug 1869217. Don't use the @page rules that match the first page as the page defaults. r=emilio 2023-12-11 17:53:41 +00:00
svg Bug 1839051 - Remove include nsQuickSort.h from some more files. r=emilio 2023-12-11 06:53:28 +00:00
tables Bug 1839051 - Use nsTArray::Sort in the SpanningCellSorter. r=xpcom-reviewers,emilio 2023-12-11 06:53:27 +00:00
tools Bug 1839051 - Remove include nsQuickSort.h from some more files. r=emilio 2023-12-11 06:53:28 +00:00
xul Backed out changeset 76af96bf48b4 (bug 1868868) for causing reftest failures on root-scrollbar-zoomed-in-async-scroll.html CLOSED TREE 2023-12-09 04:29:42 +02:00
moz.build