Commit Graph

1318 Commits

Author SHA1 Message Date
Andrew McCreight
d4a8bd78d9 Bug 1899866 - Remove very frequent CanvasShutdownManager::Destroy() warning. r=gfx-reviewers,bradwerth
This is one of the most common sources of debug log spam.

Differential Revision: https://phabricator.services.mozilla.com/D212169
2024-05-30 19:35:40 +00:00
sotaro
c17ebc98c2 Bug 1896780 - Change IsGpuProcessEnabled() as to complete soon r=gfx-reviewers,bradwerth,jnicol
config state of gfx::Feature::GPU_PROCESS is mirrored to gfx::gfxVars::GPUProcessEnabled(). It is threadsafe.

Differential Revision: https://phabricator.services.mozilla.com/D210386
2024-05-16 00:06:33 +00:00
Jamie Nicol
becb5e70d3 Bug 1880503 - Handle sync IPC timeout in UiCompositorControllerChild. r=aosmond
Extend the sync IPC timeout mechanism in CompositorManagerChild to
additionally cover UiCompositorControllerChild. As
UiCompositorControllerChild runs on the Android UI thread, we ensure
GPUProcessManager::KillProcess dispatches to the gecko main thread.

Along with the previous patch in this series this should provide us
with crash reports when the Android UI thread is hung waiting for the
GPU process to reply.

Differential Revision: https://phabricator.services.mozilla.com/D202167
2024-05-14 12:58:36 +00:00
Jamie Nicol
0056a7ee56 Bug 1880503 - Generate paired minidump when GPU process is killed following IPC timeout. r=aosmond,gsvelto
When sync IPC under the top-level PCompositorManager protocol does not
reply within a certain time threshold we purposefully kill the GPU
process. While this allows the user to recover from a stuck GPU
process, we have little visibility about the underlying cause.

This patch makes it so that we generate a paired minidump for the GPU
and parent processes prior to killing the GPU process in
GPUProcessHost::KillHard(). The implementation roughly follows the
equivalent for content processes in ContentParent::KillHard().

As the GPU process can be purposefully killed during normal operation,
and because generating minidumps can be expensive, we are careful to
only do so when the new argument aGenerateMinidump is true. We
additionally remove the aReason argument as it is unused (and
currently innacurate in some places).

As these minidumps may not automatically submitted we limit the
minidumps generation to twice per session in order to avoid
accumulating a large number of unsubmitted minidumps on disk.

Differential Revision: https://phabricator.services.mozilla.com/D202166
2024-05-14 12:58:35 +00:00
sotaro
2be68ff00a Bug 1879425 - Log GPU device reset to gfx Failure Log of about:support r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D209926
2024-05-14 10:50:23 +00:00
Stanca Serban
dcd1e2c3f0 Backed out changeset 1c48635919fb (bug 1879425) for causing build bustages. CLOSED TREE 2024-05-14 04:55:08 +03:00
sotaro
e18a85127f Bug 1879425 - Log GPU device reset to gfx Failure Log of about:support r=gfx-reviewers,lsalzman
Unify how to log device reset. It helps for debugging.

Differential Revision: https://phabricator.services.mozilla.com/D209926
2024-05-14 00:46:12 +00:00
Stanca Serban
ad459e5cb0 Backed out 3 changesets (bug 1880503) for causing build bustages in nsCOMPtr.h. CLOSED TREE
Backed out changeset 437063345a7b (bug 1880503)
Backed out changeset 9665aa5e821d (bug 1880503)
Backed out changeset 44d08ce97ae6 (bug 1880503)
2024-05-13 21:08:49 +03:00
Jamie Nicol
432347390a Bug 1880503 - Handle sync IPC timeout in UiCompositorControllerChild. r=aosmond
Extend the sync IPC timeout mechanism in CompositorManagerChild to
additionally cover UiCompositorControllerChild. As
UiCompositorControllerChild runs on the Android UI thread, we ensure
GPUProcessManager::KillProcess dispatches to the gecko main thread.

Along with the previous patch in this series this should provide us
with crash reports when the Android UI thread is hung waiting for the
GPU process to reply.

Differential Revision: https://phabricator.services.mozilla.com/D202167
2024-05-13 16:52:13 +00:00
Jamie Nicol
6e07140f91 Bug 1880503 - Generate paired minidump when GPU process is killed following IPC timeout. r=aosmond,gsvelto
When sync IPC under the top-level PCompositorManager protocol does not
reply within a certain time threshold we purposefully kill the GPU
process. While this allows the user to recover from a stuck GPU
process, we have little visibility about the underlying cause.

This patch makes it so that we generate a paired minidump for the GPU
and parent processes prior to killing the GPU process in
GPUProcessHost::KillHard(). The implementation roughly follows the
equivalent for content processes in ContentParent::KillHard().

As the GPU process can be purposefully killed during normal operation,
and because generating minidumps can be expensive, we are careful to
only do so when the new argument aGenerateMinidump is true. We
additionally remove the aReason argument as it is unused (and
currently innacurate in some places).

As these minidumps may not automatically submitted we limit the
minidumps generation to twice per session in order to avoid
accumulating a large number of unsubmitted minidumps on disk.

Differential Revision: https://phabricator.services.mozilla.com/D202166
2024-05-13 16:52:12 +00:00
Natalia Csoregi
ab9ee3940a Backed out 3 changesets (bug 1880503) for causing bustage on CrashReporterHost.h. CLOSED TREE
Backed out changeset 296455072556 (bug 1880503)
Backed out changeset 842611b8fcbc (bug 1880503)
Backed out changeset eae32f6ab26c (bug 1880503)
2024-04-30 18:26:00 +03:00
Jamie Nicol
28108055b6 Bug 1880503 - Handle sync IPC timeout in UiCompositorControllerChild. r=aosmond
Extend the sync IPC timeout mechanism in CompositorManagerChild to
additionally cover UiCompositorControllerChild. As
UiCompositorControllerChild runs on the Android UI thread, we ensure
GPUProcessManager::KillProcess dispatches to the gecko main thread.

Along with the previous patch in this series this should provide us
with crash reports when the Android UI thread is hung waiting for the
GPU process to reply.

Differential Revision: https://phabricator.services.mozilla.com/D202167
2024-04-30 15:06:21 +00:00
Jamie Nicol
e4dd0c49fb Bug 1880503 - Generate paired minidump when GPU process is killed following IPC timeout. r=aosmond,gsvelto
When sync IPC under the top-level PCompositorManager protocol does not
reply within a certain time threshold we purposefully kill the GPU
process. While this allows the user to recover from a stuck GPU
process, we have little visibility about the underlying cause.

This patch makes it so that we generate a paired minidump for the GPU
and parent processes prior to killing the GPU process in
GPUProcessHost::KillHard(). The implementation roughly follows the
equivalent for content processes in ContentParent::KillHard().

As the GPU process can be purposefully killed during normal operation,
and because generating minidumps can be expensive, we are careful to
only do so when the new argument aGenerateMinidump is true. We
additionally remove the aReason argument as it is unused (and
currently innacurate in some places).

As these minidumps may not automatically submitted we limit the
minidumps generation to twice per session in order to avoid
accumulating a large number of unsubmitted minidumps on disk.

Differential Revision: https://phabricator.services.mozilla.com/D202166
2024-04-30 15:06:21 +00:00
alwu
053270f7b0 Bug 1892516 - part5 : report Glean probe from the chrome process. r=media-playback-reviewers,padenot
According to [1], currently we can only set a labeled boolean from the
chrome process, so we need to adjust our design to report result from
reporting from the GPU/RDD process to the chrome process.

Therefore, we have to always check HEVC first, and trim it later in
order to not to incorrectly support HEVC if the pref for HEVC is off.

[1] https://firefox-source-docs.mozilla.org/toolkit/components/glean/dev/ipc.html#forbidding-non-commutative-operations

Differential Revision: https://phabricator.services.mozilla.com/D208716
2024-04-29 17:46:29 +00:00
alwu
2b1351d2b2 Bug 1892516 - part3 : use Glean API and report the probe on more platforms. r=padenot
`device_hardware_decoding_support` was previously only recorded on
Windows and we want to extend this probe to other platforms as well.

Differential Revision: https://phabricator.services.mozilla.com/D208245
2024-04-29 17:46:28 +00:00
alwu
cb1209a5df Bug 1892516 - part2 : report false for unsupported codecs. r=media-playback-reviewers,padenot
Differential Revision: https://phabricator.services.mozilla.com/D208244
2024-04-29 17:46:28 +00:00
alwu
20c124ffe1 Bug 1892516 - part1 : explicitly disable HEVC support to avoid running the initialization again. r=media-playback-reviewers,padenot
We can actually control whether HEVC is enabled by setting
`sForceEnableHEVC` to false without running decoder module's
initialization again, which can save some time because the
initialization is expensive.

[1] https://searchfox.org/mozilla-central/rev/ee9fd5e2df79c6d69af5aa9bc36041166f483227/dom/media/platforms/wmf/WMFDecoderModule.cpp#486

Differential Revision: https://phabricator.services.mozilla.com/D208243
2024-04-29 17:46:27 +00:00
Sandor Molnar
6d01c0b28a Backed out 3 changesets (bug 1892516) for causing multiple failures @ toolkit/components/glean/api/src/private/boolean.rs CLOSED TREE
Backed out changeset 842a809422f9 (bug 1892516)
Backed out changeset 5155a959fe13 (bug 1892516)
Backed out changeset d1cebb819ab9 (bug 1892516)
2024-04-25 21:30:10 +03:00
alwu
dbd07bdc6a Bug 1892516 - part3 : use Glean API and report the probe on more platforms. r=padenot
`device_hardware_decoding_support` was previously only recorded on
Windows and we want to extend this probe to other platforms as well.

Differential Revision: https://phabricator.services.mozilla.com/D208245
2024-04-25 17:32:16 +00:00
alwu
83af8f4c6e Bug 1892516 - part2 : report false for unsupported codecs. r=media-playback-reviewers,padenot
Differential Revision: https://phabricator.services.mozilla.com/D208244
2024-04-25 17:32:15 +00:00
alwu
8d2a25def5 Bug 1892516 - part1 : explicitly disable HEVC support to avoid running the initialization again. r=media-playback-reviewers,padenot
We can actually control whether HEVC is enabled by setting
`sForceEnableHEVC` to false without running decoder module's
initialization again, which can save some time because the
initialization is expensive.

[1] https://searchfox.org/mozilla-central/rev/ee9fd5e2df79c6d69af5aa9bc36041166f483227/dom/media/platforms/wmf/WMFDecoderModule.cpp#486

Differential Revision: https://phabricator.services.mozilla.com/D208243
2024-04-25 17:32:15 +00:00
alwu
f4425129ba Bug 1885671 - part3 : initialize Media Foundation earlier for GPU process. r=media-playback-reviewers,padenot
This is used to fix the failures [1] on Windows xpcshell test on the try
server. As we've changed the timing of initailizing in previous patches,
that delays the timing of setting clean-up for MediaFoundationInitializer.

MediaFoundationInitializer has to be clean on MTA thread, but on the try
server, when the runnable for clean-up being dispatched on the main
thread, the MTA thread has been shutdowned.

Therefore, we would like to run the initialization earlier to ensure the
clean-up can be setup properly, which is like what we do for RDD [2].

[1] https://treeherder.mozilla.org/logviewer?job_id=455059875&repo=autoland&lineNumber=2090
[2] https://searchfox.org/mozilla-central/rev/eb4700a6be8371fe07053bc066c2d48ba813ce3d/dom/media/ipc/RDDParent.cpp#108-111

Differential Revision: https://phabricator.services.mozilla.com/D208250
2024-04-25 02:20:22 +00:00
alwu
478cb296e2 Bug 1885671 - part1 : run the method of getting codec supported on the background thread in order not to block the main thread. r=jrmuizel
There are modifications needed for PDMfactory and the decoder modules in
order to run their methods on non-mainthread and keep them threadsafe.

Differential Revision: https://phabricator.services.mozilla.com/D206420
2024-04-25 02:20:21 +00:00
Nika Layzell
f3ebfed97b Bug 1875528 - Part 2: Break the strong reference cycle between WebGPUChild and CanvasManagerChild, r=webgpu-reviewers,nical
The strong reference from CanvasManagerChild to WebGPUChild was never cleared
when the WebGPUChild dies, meaning that it would form a strong cycle through
the `Manager()` reference.

Under the new system, the WebGPUChild actor is kept alive by the IPC
connection, and will be torn down when the IPC connection dies.

Differential Revision: https://phabricator.services.mozilla.com/D198625
2024-04-22 17:13:23 +00:00
Eden Chuang
2f65cf28ae Bug 1769913 - P3 Remove WorkerRunnable::mWorkerPrivate. r=dom-worker-reviewers,asuth
WorkerRunnable no longer keeps a raw pointer(mWorkerPrivate) for the associated WorkerPrivate in this patch.
Removing the WorkerRunnable::mWorkerPrivate needs to fix the following problems.

1. Thread assertions in WorkerRunnable::Dispatch()

To fix this problem, the associated WorkerPrivate is as a parameter and passed to WorkerRunnable::Dispatch() for the dispatching thread assertions. This associated WorkerPrivate is also propagated to PreDispatch() and PostDispatch() for the children classes of WorkerRunnable()

2. Get the associated WorkerPrivate in WorkerRunnable::Run() for environment setup(GlobabObject, JSContext setting for the runnable)

- For WorkerThreadRunnable

Since WorkerThreadRunnable is supposed to run on the worker thread, it does not need to keep a raw pointer to WorkerPrivate as its class member. GetCurrentThreadWorkerPrivate() should always get the correct WorkerPrivate for WorkerThreadRunnable.

- For WorkerParentThreadRunnable

WorkerParentRef is introduced to keep a RefPtr<WorkerPrivate> for WorkerParentThreadRunnable instead of using a raw pointer.
Checking the associated WorkerPrivate existence by WorkerParentRef at the beginning of WorkerParentThreadRunnable::Run(). If the Worker has already shut down, WorkerParentThreadRunnable cannot do anything with the associated WorkerPrivate, so WorkerParentThreadRunnable::Run() will return NS_OK directly but with a warning.

The associated WorkerPrivate is also passed into WorkerRun(), PreRun(), and PostRun(), so the majority of implementations of child classes of WorkerRunnable do not need to be changed.

If there are any cases in which the child classes of WorkerThreadRunnable/WorkerParentThreadRunnable want to keep the associated WorkerPrivate, they should use WorkerRefs instead of raw pointers.

Depends on D205679

Differential Revision: https://phabricator.services.mozilla.com/D207039
2024-04-19 09:41:58 +00:00
Eden Chuang
e22d6ca385 Bug 1769913 - P1 Make WorkerRunnable to be a base class for runnables on Worker thread and Worker's parent thread. r=dom-worker-reviewers,asuth
This is the first step in splitting the parent thread runnable out of WorkerRunnable.

To reuse the runnable dispatching codes in Worker, we still need a base class for runnable on the worker thread and the parent thread.

In this patch, we rename the original WorkerRunnable to WorkerThreadRunnable and make WorkerRunnable to be WorkerThreadRunnable's parent class.

In the second patch, we will create WorkerParentThreadRunnable and its sub-classes, split from WorkerThreadRunnable for runnable on the Worker's parent thread.

And in the third patch, we will re-structure the content of WorkerParentThreadRunnable to remove unnecessary members.

Differential Revision: https://phabricator.services.mozilla.com/D205178
2024-04-19 09:41:57 +00:00
Stanca Serban
5a5e8146fd Backed out 2 changesets (bug 1885671) for causing Windows xpcshell assertion failures on ClearOnShutdown.cpp. CLOSED TREE
Backed out changeset 0c53f738aa7f (bug 1885671)
Backed out changeset 1189be6d8d0e (bug 1885671)
2024-04-18 23:52:53 +03:00
alwu
6a0a4e413c Bug 1885671 - run the method of getting codec supported on the background thread in order not to block the main thread. r=jrmuizel
There are modifications needed for PDMfactory and the decoder modules in
order to run their methods on non-mainthread and keep them threadsafe.

Differential Revision: https://phabricator.services.mozilla.com/D206420
2024-04-18 17:15:34 +00:00
Cristina Horotan
1a34259635 Backed out changeset 68ea681f466b (bug 1885671) for causing xpcshell failures at test_privacy_transition.js CLOSED TREE 2024-04-17 00:42:33 +03:00
alwu
ddec4dc371 Bug 1885671 - run the method of getting codec supported on the background thread in order not to block the main thread. r=jrmuizel
There are modifications needed for PDMfactory and the decoder modules in
order to run their methods on non-mainthread and keep them threadsafe.

Differential Revision: https://phabricator.services.mozilla.com/D206420
2024-04-16 19:20:13 +00:00
Lee Salzman
3df91287ff Bug 1888338 - Use a single SharedContextWebgl. r=aosmond
This shares a global SharedContextWebgl among all instances of CanvasTranslator.
The goal is that regardless of how many windows are open, we only have to pay the
startup costs and shader compilation times for SharedContextWebgl once. In the
event that all CanvasTranslators are gone, the SharedContextWebgl is kept around
while its internal caches and textures are discarded to avoid significant memory
usage when no canvases are in use, while at the same time saving on startup
costs the next time a first live CanvasTranslator is created.

Differential Revision: https://phabricator.services.mozilla.com/D205977
2024-03-28 17:33:58 +00:00
Andrew Osmond
503fb4c624 Bug 1887729 - Implement context lost/restored support for CanvasRenderingContext2D. r=webidl,gfx-reviewers,smaug,lsalzman
Remote canvas can run in the GPU process, and if the GPU process
crashes, we need to notify the application using canvas. Historically we
just failed, and the application may have been able to continue drawing
but with the contents prior to the crash lost. Later we regressed to
prevent the canvas from being used at all.

This patch makes it so that we can restore functionality to any
application that supports the contextlost/contextrestored events. This
will allow for a theoretical complete graceful recovery for the user
with minimal disruption.

Differential Revision: https://phabricator.services.mozilla.com/D205608
2024-03-28 14:50:20 +00:00
Butkovits Atila
da7915ebcd Backed out changeset 40fa8e4b06c8 (bug 1887729) for causing failures at test_accelerated_canvas_context_loss.html. CLOSED TREE 2024-03-28 05:09:32 +02:00
Andrew Osmond
da63648349 Bug 1887729 - Implement context lost/restored support for CanvasRenderingContext2D. r=webidl,gfx-reviewers,smaug,lsalzman
Remote canvas can run in the GPU process, and if the GPU process
crashes, we need to notify the application using canvas. Historically we
just failed, and the application may have been able to continue drawing
but with the contents prior to the crash lost. Later we regressed to
prevent the canvas from being used at all.

This patch makes it so that we can restore functionality to any
application that supports the contextlost/contextrestored events. This
will allow for a theoretical complete graceful recovery for the user
with minimal disruption.

Differential Revision: https://phabricator.services.mozilla.com/D205608
2024-03-28 01:51:23 +00:00
Andrew Osmond
0a149a309c Bug 1886022 - Refactor canvas shutdown to account for process crashes. r=gfx-reviewers,lsalzman
We previously refactor canvas shutdown to account for the fact that they
needed to be shutdown in conjunction with the DOM worker reference
kept alive by the CanvasManagerChild. Unfortunately if the compositor
process crashes, or otherwise the CanvasManagerChild actor is torn down,
we also prematurely shutdown the canvas when it would previously
fallback to Skia in the content process.

This patch abstracts out canvas shutdown into the CanvasShutdownManager
which has the owning reference to the ThreadSafeWorkerRef. It corrects a
similar bug on the main thread as well for HTMLCanvasElement.

Differential Revision: https://phabricator.services.mozilla.com/D204988
2024-03-19 14:09:13 +00:00
Cosmin Sabou
cb3c42a748 Backed out changeset 0e250e45603a (bug 1886022) for causing build bustages on CanvasShutdownManager. CLOSED TREE 2024-03-19 09:42:20 +02:00
Andrew Osmond
7d7daabe06 Bug 1886022 - Refactor canvas shutdown to account for process crashes. r=gfx-reviewers,lsalzman
We previously refactor canvas shutdown to account for the fact that they
needed to be shutdown in conjunction with the DOM worker reference
kept alive by the CanvasManagerChild. Unfortunately if the compositor
process crashes, or otherwise the CanvasManagerChild actor is torn down,
we also prematurely shutdown the canvas when it would previously
fallback to Skia in the content process.

This patch abstracts out canvas shutdown into the CanvasShutdownManager
which has the owning reference to the ThreadSafeWorkerRef. It corrects a
similar bug on the main thread as well for HTMLCanvasElement.

Differential Revision: https://phabricator.services.mozilla.com/D204988
2024-03-19 00:39:55 +00:00
Gabriele Svelto
aa43fa218e Bug 1831092 - Use the new pull-based API for all crash annotations and remove the global annotations table r=jgilbert,necko-reviewers,media-playback-reviewers,profiler-reviewers,win-reviewers,padenot,handyman,afranchuk,valentin,alwu,sotaro
This changes comes with several different refactorings all rolled into one,
unfotunately I couldn't find a way to pull them apart:
- First of all annotations now can either recorded (that is, we copy the value
  and have the crash reporting code own the copy) or registered. Several
  annotations are changed to use this functionality so that we don't need to
  update them as their value change.
- The code in the exception handler is modified to read the annotations from
  the mozannotation_client crate. This has the unfortunate side-effect that
  we need three different bits of code to serialize them: one for annotations
  read from a child process, one for reading annotations from the main process
  outside of the exception handler and one for reading annotations from the
  main process within the exception handler. As we move to fully
  out-of-process crash reporting the last two methods will go away.
- The mozannotation_client crate now doesn't record annotation types anymore.
  I realized as I was working on this that storing types at runtime has two
  issues: the first one is that buggy code might change the type of an
  annotation (that is record it under two different types at two different
  moments), the second issue is that types might become corrupt during a
  crash, so better enforce them at annotation-writing time. The end result is
  that the mozannotation_* crates now only store byte buffers, track the
  format the data is stored in (null-terminated string, fixed size buffer,
  etc...) but not the type of data each annotation is supposed to contain.
- Which brings us to the next change: concrete types for annotations are now
  enforced when they're written out. If an annotation doesn't match the
  expected type it's skipped. Storing an annotation with the wrong type will
  also trigger an assertion in debug builds.

Differential Revision: https://phabricator.services.mozilla.com/D195248
2024-03-04 10:24:43 +00:00
sotaro
b41ff7d6db Bug 1851736 - Enable NVIDIA RTX Video Super Resolution for video overlay on Windows only during power charge r=gfx-reviewers,ahale
Super Resolution consumes more power. Then it is better to enable it only during power charging.

Differential Revision: https://phabricator.services.mozilla.com/D202781
2024-03-01 04:00:59 +00:00
sotaro
85c155ff51 Bug 1880926 - Check if system enables HDR on Windows r=gfx-reviewers,lsalzman
By using IDXGIOutput6, we could check if system enables HDR on Windows.

DeviceManagerDx::SystemHDREnabled() is expected to be called in GPU process.

Differential Revision: https://phabricator.services.mozilla.com/D202186
2024-02-22 01:59:40 +00:00
Stanca Serban
efaea2a894 Backed out changeset ad2add2f3c60 (bug 1880926) as requested for causing bug 1880938. 2024-02-21 16:03:48 +02:00
Andrew Osmond
c743180764 Bug 1855742 - Part 2. Allow CanvasDrawEventRecorder to be created on DOM workers. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D189530
2024-02-21 03:08:03 +00:00
sotaro
6919c26e41 Bug 1880926 - Check if system enables HDR on Windows r=gfx-reviewers,lsalzman
By using IDXGIOutput6, we could check if system enables HDR on Windows.

DeviceManagerDx::SystemHDREnabled() is expected to be called in GPU process.

Differential Revision: https://phabricator.services.mozilla.com/D202186
2024-02-20 02:58:29 +00:00
Jamie Nicol
9d752d61b9 Bug 1879504 - Reset GPU process' unstable launch counter when we successfully launch a stable process. r=aosmond
We are seeing Android users running software webrender at a much
higher frequency than desired due to encountering too many unstable
GPU processes. We currently fall back to software webrender after
encountering 6 unstable GPU processes in total over the course of the
parent process' lifetime. This patch makes it so that the counter is
reset once a GPU process is declared stable, meaning we will only fall
back if they encounter enough crashes/errors in quick succession.

Hopefully this helps keep users running with a GPU process and
hardware acceleration over the course of a long session, whilst still
falling back if they hit an unrecoverable error/crash.

Differential Revision: https://phabricator.services.mozilla.com/D201204
2024-02-09 13:32:33 +00:00
Bob Owen
b2f76b690b Bug 1877957 p3: Check gfxVars are initialised in ReportHardwareMediaCodecSupportIfNeeded. r=alwu
This was causing a permanent failure for some xpcshell tests, possibly due to a
timing change.

Differential Revision: https://phabricator.services.mozilla.com/D200795
2024-02-08 17:26:20 +00:00
sotaro
5eabf27101 Bug 1817617 - Wait ID3D11Query of D3D11Texture2D copy complete just before blitting for video overlay with non Intel GPUs r=media-playback-reviewers,padenot
Normally when D3D11Texture2D is copied by ID3D11DeviceContext::CopySubresourceRegion() with compositor device, WebRender does not need to wait copy complete, since WebRender also uses compositor device.

But with Non-intel GPUs(like NDIVIA), there is a case that the copy complete need to be wait explicitly even with compositor device

mSyncObject->Synchronize() could not be used with compositor device.

Wait of the query is not called in D3D11DXVA2Manager::CopyToImage(), since the wait could take long time. Then the Wait of the query is deferred to just before blitting for video overlay.

Differential Revision: https://phabricator.services.mozilla.com/D200041
2024-02-01 10:28:32 +00:00
Andrew Osmond
292aed05d5 Bug 1875661 - Refactor shutdown for remote canvas. r=gfx-reviewers,lsalzman
This patch makes it so that we always shutdown gracefully by making
us flush the event queue for CanvasRenderThread, after blocking on the
task queues draining. This allows our dependencies like RemoteTextureMap
to shutdown successfully.

It also fixes a bug where CanvasTranslator::CanSend would still return
true on Windows, while blocked on in CanvasTranslator::ActorDestroy
waiting for the task queue to shutdown. The CanSend status is only
updated after ActorDestroy is called from IProtocol::DestroySubtree.

Differential Revision: https://phabricator.services.mozilla.com/D199186
2024-01-25 22:22:49 +00:00
Stanca Serban
5a48aa44db Backed out 6 changesets (bug 1875528) for causing leakcheck failures. CLOSED TREE
Backed out changeset dcbbb7316940 (bug 1875528)
Backed out changeset a5c0564f9761 (bug 1875528)
Backed out changeset f3bc6e972f79 (bug 1875528)
Backed out changeset 535378dd79b0 (bug 1875528)
Backed out changeset 3cef14ed0f25 (bug 1875528)
Backed out changeset f0941fdbbabb (bug 1875528)
2024-01-25 01:26:46 +02:00
Nika Layzell
7f6803f4ca Bug 1875528 - Part 2: Break the strong reference cycle between WebGPUChild and CanvasManagerChild, r=webgpu-reviewers,nical
The strong reference from CanvasManagerChild to WebGPUChild was never cleared
when the WebGPUChild dies, meaning that it would form a strong cycle through
the `Manager()` reference.

Under the new system, the WebGPUChild actor is kept alive by the IPC
connection, and will be torn down when the IPC connection dies.

Differential Revision: https://phabricator.services.mozilla.com/D198625
2024-01-24 20:54:40 +00:00
Stanca Serban
c8b4d1c3b8 Backed out changeset e22428605dbb (bug 1875661) for causing bp-nu bustages in RefPtr.h and for causing mochitests assertion failures in WeakPtr.h. CLOSED TREE 2024-01-24 21:11:11 +02:00