gecko-dev/layout
Lee Salzman ada9a43cc2 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-05 09:37:03 +00:00
..
base Bug 1715179 - Propagate transform matrix and relevant zoom values to convert CSSRect/CSSPoint in OOPIF to top level content document cooords. r=botond 2023-12-04 09:31:23 +00:00
build Backed out 6 changesets (bug 1712140) for causing wpt failures on declarative-shadow-dom-opt-in.html. 2023-12-04 22:30:04 +02: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 1863759 - Make `IMEStateManager` recreate `IMEContentObserver` if the active one is not observing editable content of focused element r=smaug,m_kato 2023-12-05 02:33:18 +00:00
inspector Bug 1866707 - Make `InspectorUtils.isInheritedProperty` check property definition in custom properties registry. r=zrhoffman. 2023-11-27 18:39:10 +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 1862277. Call InvalidateRenderingObservers in nsIFrame::Init for frames that won't get a reflow. r=layout-reviewers,emilio 2023-12-03 05:02:16 +00:00
printing Bug 1867674. Always honor pref print.save_as_pdf.use_page_rule_size_as_paper_size.enabled. r=AlaskanEmily 2023-12-01 21:06:02 +00:00
reftests Bug 1829026 - Update CanvasTranslator to work with DrawTargetWebgl. r=aosmond 2023-12-05 09:37:03 +00:00
style Bug 1868047 - nsComputedDOMStyle doesn't need to observe all the mutations, r=emilio 2023-12-03 21:12:25 +00:00
svg Bug 1868049 - Use nsIMutationObserver's native callback optimisation mechanism r=emilio 2023-12-04 20:57:57 +00:00
tables Backed out 8 changesets (bug 1839051) for causing assertion failures on NotificationController.cpp. CLOSED TREE 2023-12-04 22:34:25 +02:00
tools Backed out 8 changesets (bug 1839051) for causing assertion failures on NotificationController.cpp. CLOSED TREE 2023-12-04 22:34:25 +02:00
xul Bug 1866011 p2. Rename nsIDocShell.contentViewer. r=emilio,credential-management-reviewers,devtools-reviewers,sgalich 2023-11-24 09:10:52 +00:00
moz.build