62 Commits

Author SHA1 Message Date
Andrew Osmond
5ae0b39d4b Bug 1919689 - Cleanup WorkerRunnable subclass constructors in graphics. r=gfx-reviewers,lsalzman
This patch removes no longer needed WorkerPrivate* parameters from the
runnable constructors. It also converts some instances of using
WorkerThreadRunnable as a base class when MainThreadWorkerRunnable is
more suitable.

Differential Revision: https://phabricator.services.mozilla.com/D222735
2024-09-19 13:59:16 +00:00
Alex Franchuk
ab8fa1ab81 Bug 1454819 - Simplify SharedMemory classes r=ipc-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D217487
2024-08-06 18:16:08 +00:00
Noemi Erli
333a6c0ada Backed out changeset e5864b976c3b (bug 1454819) for causing build bustages in SharedMemory.cpp CLOSED TREE 2024-08-05 18:08:32 +03:00
Alex Franchuk
0a72f7d63c Bug 1454819 - Simplify SharedMemory classes r=ipc-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D217487
2024-08-05 13:01:33 +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
sotaro
9c96712d23 Bug 1887818 - Prevent to call GPUVideoImage::GetAsSourceSurface() in CanvasRenderingContext2D::DrawImage() for RemoteDecoderVideoSubDescriptor::Tnull_t if CanvasTranslator is used r=gfx-reviewers,lsalzman
GPUVideoImage::GetAsSourceSurface() is heavy weight. It seems better to prevent to call it if possible.

The change handles only a case that CanvasTranslator is used, SurfaceDescriptor is RemoteDecoderVideoSubDescriptor::Tnull_t and OptimizeShadow is not used.

DrawTargetRecording::DrawSurfaceDescriptor() also holds layers::Image of SurfaceDescriptor. It is necessary to keep the Image alive in CanvasDrawEventRecorder until end of its usage in CanvasTranslator.

Differential Revision: https://phabricator.services.mozilla.com/D205677
2024-03-28 06:24:41 +00:00
Lee Salzman
44d3c382b8 Bug 1881194 - Send TexTypeForWebgl from CanvasChild to CanvasTranslator. r=sotaro
ImageBridgeChild::GetSingleton returns null in the GPU process. This causes
DrawTargetWebgl::CopyToSwapChain to use an incorrect texture type for WebGL
canvases when in the GPU process. To work around this, determine the texture
type for WebGL in the content process and send it to CanvasTranslator for
later usage.

Differential Revision: https://phabricator.services.mozilla.com/D202292
2024-02-22 04:28:44 +00: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
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
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
Andrew Osmond
15e600c321 Bug 1875661 - Refactor task queue utilization for remote canvas. r=gfx-reviewers,lsalzman
This patch makes it so that we always shutdown gracefully by making
accelerated canvas also use a TaskQueue, albeit one that just uses the
CanvasRenderThread directly. This allows us to block shutdown on the
task queues draining before advancing to shutting down other
dependencies like RemoteTextureMap.

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-24 17:58:53 +00:00
Bob Owen
4a87fc10f7 Bug 1875272: Deactivate remote canvas if reference texture create fails. r=aosmond,gfx-reviewers
Depends on D199222

Differential Revision: https://phabricator.services.mozilla.com/D199223
2024-01-22 16:38:53 +00:00
Bob Owen
9576894912 Bug 1872705: Set a maximum number of recycled canvas buffers. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D197856
2024-01-10 08:19:03 +00:00
Andrew Osmond
484b8d4e39 Bug 1871613 - Ensure CanvasDrawEventRecorder releases external surface dependencies. r=gfx-reviewers,lsalzman
This patch makes CanvasDrawEventRecorder track what eventCount we
recorded an external surface reference. When the reader has increment
its processedCount above that, we will release our reference as it
should have acquired a strong reference to the data. This was previously
done when we forwarded the texture, but with remote textures, we no
longer have this event. Now we check when we start a new recording, or
attempt to clear cached resources.

Differential Revision: https://phabricator.services.mozilla.com/D197216
2023-12-23 01:34:31 +00:00
Andrew Osmond
0837c517ad Bug 1870957 - Part 1. Add/update owning thread assertions to CanvasChild/DrawEventRecorder. r=gfx-reviewers,lsalzman
This patch adds/updates the thread assertion plumbing for CanvasChild
and DrawEventRecorder to ensure that we are always accessing them on the
owning thread. It also now makes these checks compatible with running in
a DOM worker context for OffscreenCanvas using recordings.

Differential Revision: https://phabricator.services.mozilla.com/D189526
2023-12-20 13:01:18 +00:00
Noemi Erli
7b97e142d0 Backed out 12 changesets (bug 1795296, bug 1855742) as requested by aosmond a=backout
Backed out changeset 05b607c3bbe6 (bug 1795296)
Backed out changeset 7704291111b4 (bug 1855742)
Backed out changeset db60743295fb (bug 1855742)
Backed out changeset 8ed51e7d1c98 (bug 1855742)
Backed out changeset 40cba2c51b1c (bug 1855742)
Backed out changeset d4bfe15c07ec (bug 1855742)
Backed out changeset 2061271c53e8 (bug 1855742)
Backed out changeset 5b2a89a61f7f (bug 1855742)
Backed out changeset 2028c7018977 (bug 1855742)
Backed out changeset 13e806495fb8 (bug 1855742)
Backed out changeset 4bfa0d4913a2 (bug 1855742)
Backed out changeset 711b3f47e380 (bug 1855742)
2023-12-19 17:25:55 +02:00
Andrew Osmond
160c68efc3 Bug 1855742 - Part 10. Allow recording surfaces and textures to be created on DOM workers. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D189531
2023-12-19 05:10:35 +00:00
Andrew Osmond
09f7cdee80 Bug 1855742 - Part 9. Allow CanvasDrawEventRecorder to be created on DOM workers. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D189530
2023-12-19 05:10:34 +00:00
Andrew Osmond
2cd5b292c7 Bug 1855742 - Part 1. Add/update owning thread assertions to CanvasChild/DrawEventRecorder. r=gfx-reviewers,lsalzman
This patch adds/updates the thread assertion plumbing for CanvasChild
and DrawEventRecorder to ensure that we are always accessing them on the
owning thread. It also now makes these checks compatible with running in
a DOM worker context for OffscreenCanvas using recordings.

Differential Revision: https://phabricator.services.mozilla.com/D189526
2023-12-19 05:10:31 +00:00
Andrew Osmond
c5861c3ba9 Bug 1870681 - Check for invalid buffers when clearing a canvas recorder's cached buffer pool. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D196763
2023-12-18 18:13:19 +00:00
Lee Salzman
5b34ab7937 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-18 18:10:46 +00:00
Butkovits Atila
54f7c0f0e4 Merge mozilla-central to autoland. CLOSED TREE 2023-12-13 23:48:40 +02:00
Sebastian Hengst
4d6a5b9742 Backed out 10 changesets (bug 1829026) for causing bug 1869760 and bug 1869738. a=backout
Backed out changeset 4c619422efe5 (bug 1829026)
Backed out changeset 77da89c7dab7 (bug 1829026)
Backed out changeset 19d28d8f75a4 (bug 1829026)
Backed out changeset 674b60ba54b1 (bug 1829026)
Backed out changeset 31935f164ef0 (bug 1829026)
Backed out changeset 13c9bf69085f (bug 1829026)
Backed out changeset 330a6732fc0b (bug 1829026)
Backed out changeset 974c08a3791b (bug 1829026)
Backed out changeset 3ba040642ddc (bug 1829026)
Backed out changeset 9d9b3a68858c (bug 1829026)
2023-12-13 19:20:00 +01:00
Bob Owen
499038bba2 Bug 1869822: Check that mCurrentBuffer is valid in CanvasDrawEventRecorder::GetContiguousBuffer. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D196313
2023-12-13 17:47:58 +00:00
Andrew Osmond
655f49c541 Bug 1869658 - Fix usage of CanvasBuffer on failure paths. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D196232
2023-12-13 03:45:16 +00:00
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
Bob Owen
418567a664 Bug 1863914: Use multiple shmem buffers for remote canvas recording. r=aosmond
This replaces the use of a single large ring buffer.
The buffers are still processed in parallel and are recycled to reduce
allocation. Events that do not fit in the default sized buffer have a separate
buffer created to fit them. These large buffers are not recycled.
Separate shared memory is used for readback, with a single shmem cached for this
purpose. Generally only one cached shmem should be required, because the
operations that usually readback the data do it straight away.

Differential Revision: https://phabricator.services.mozilla.com/D193207
2023-12-08 16:11:27 +00:00
Narcis Beleuzu
cc338968d0 Backed out changeset 71b6060b6015 (bug 1863914) for causing Bug 1868934 2023-12-08 13:18:52 +02:00
Bob Owen
c48cc82e5c Bug 1863914: Use multiple shmem buffers for remote canvas recording. r=aosmond
This replaces the use of a single large ring buffer.
The buffers are still processed in parallel and are recycled to reduce
allocation. Events that do not fit in the default sized buffer have a separate
buffer created to fit them. These large buffers are not recycled.
Separate shared memory is used for readback, with a single shmem cached for this
purpose. Generally only one cached shmem should be required, because the
operations that usually readback the data do it straight away.

Differential Revision: https://phabricator.services.mozilla.com/D193207
2023-12-07 17:27:24 +00:00
Cosmin Sabou
6f5d4853e5 Backed out 8 changesets (bug 1829026) for causing several mochitest failures. CLOSED TREE
Backed out changeset 790ba6aa65e4 (bug 1829026)
Backed out changeset 2ff1f5f41380 (bug 1829026)
Backed out changeset de6ddf5eb2a7 (bug 1829026)
Backed out changeset 773e7b31ac6e (bug 1829026)
Backed out changeset e09602ab096d (bug 1829026)
Backed out changeset fe16d4ac1049 (bug 1829026)
Backed out changeset c0fe0aea86c2 (bug 1829026)
Backed out changeset 53d6f69055f1 (bug 1829026)
2023-12-05 16:08:36 +02:00
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
Natalia Csoregi
00e5d5a924 Backed out changeset 2b56c2b2837a (bug 1863914) for causing bustage on CanvasDrawEventRecorder.h. CLOSED TREE 2023-11-22 16:31:15 +02:00
Bob Owen
818e1b42b7 Bug 1863914: Use multiple shmem buffers for remote canvas recording. r=aosmond
This replaces the use of a single large ring buffer.
The buffers are still processed in parallel and are recycled to reduce
allocation. Events that do not fit in the default sized buffer have a separate
buffer created to fit them. These large buffers are not recycled.
Separate shared memory is used for readback, with a single shmem cached for this
purpose. Generally only one cached shmem should be required, because the
operations that usually readback the data do it straight away.

Differential Revision: https://phabricator.services.mozilla.com/D193207
2023-11-22 11:52:08 +00:00
Nika Layzell
d3bbcb77cb Bug 1852082 - Part 1: Allow stealing ownership of the shared memory handle from SharedMemoryBasic, r=ipc-reviewers,mccr8
This is not the ideal form of this API, but avoids unnecessary handle
cloning and the corresponding fallible calls in some situations. In the
future we still want to do something more like bug 1797039, which will
provide a proper separation of handles from mappings for shared memory
regions.

Differential Revision: https://phabricator.services.mozilla.com/D187682
2023-09-15 15:26:50 +00:00
Bob Owen
a056e205c2 Bug 1851636: Don't create a new buffer if we fail to process the drop buffer event. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D187558
2023-09-06 16:37:56 +00:00
Bob Owen
6724c55c52 Bug 1841891: Only use a larger canvas ring buffer when in the foreground. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D186544
2023-08-29 19:17:45 +00:00
Jeff Muizelaar
066cf0ea29 Bug 1838762 - Use a uint8_t for EventType. r=lsalzman
This reduces the serialization size a little.

Differential Revision: https://phabricator.services.mozilla.com/D181177
2023-06-17 03:06:29 +00:00
Jeff Muizelaar
551660673f Bug 1838900 - Increase the size of the canvas ring buffer. r=bobowen
When drawing complicated content to canvas the ring buffer will fill up
faster than we can consume which causes us to block on the main thread.

This shows up noticeably on the chartjs SP3 test.

Other browsers don't suffer from this problem:

Safari uses 2MB buffer:
https://searchfox.org/wubkat/rev/a420a9f3f6ab4c8d0c75aae3877d736d66affe36/Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp

Chrome records into a resizable vector.

In local testing a size of 512Kb was insufficient to avoid blocking but
1Mb was enough. I'm setting it to 512Kb for now in the hope that we can
reduce the recording size and make the replay fast enough that 512Kb wil
be enough.

Differential Revision: https://phabricator.services.mozilla.com/D181272
2023-06-16 17:14:49 +00:00
Bob Owen
85d921c123 Bug 1825169: Process off main thread deletions in DrawEventRecorderPrivate::AddStoredObject. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D174952
2023-04-17 15:23:42 +00:00
Bob Owen
0abafd6d24 Bug 1741767: Use shared memory surfaces in Canvas 2D recording. r=lsalzman
This also changes SharedSurfacesParent to use a StaticMonitor, so that we can
wait for the surface to be added.

Differential Revision: https://phabricator.services.mozilla.com/D132703
2022-01-15 05:17:21 +00:00
Noemi Erli
d1f8b4b341 Backed out 2 changesets (bug 1741767) for causing assertion failures in DrawTargetD2D1.cpp CLOSED TREE
Backed out changeset bc03f747b472 (bug 1741767)
Backed out changeset 7dc323e57fd4 (bug 1741767)
2022-01-11 01:49:43 +02:00
Bob Owen
99ce176f2f Bug 1741767: Use shared memory surfaces in Canvas 2D recording. r=lsalzman
This also changes SharedSurfacesParent to use a StaticMonitor, so that we can
wait for the surface to be added.

Differential Revision: https://phabricator.services.mozilla.com/D132703
2022-01-10 19:07:14 +00:00
Nika Layzell
26555d958a Bug 1734739 - Part 1: Stop requiring otherpid for ShareTo, r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D128218
2021-11-24 17:56:00 +00:00
Nika Layzell
d73755617d Bug 1732343 - Part 2: Migrate all uses of base::FileDescriptor to UniqueFileHandle, r=handyman
This is useful for the following parts, as UniqueFileHandle is a cross-platform
type which can also be used to support transferring HANDLEs between processes.

This change requires fairly sweeping changes to existing callsites, which
previously did not require owning access to the handle types when transferring.
For the most part these changes were straightforward, but manual.

Differential Revision: https://phabricator.services.mozilla.com/D126564
2021-11-09 14:17:32 +00:00
Cristian Tuns
cbd178830f Backed out 10 changesets (bug 1732343) for causing coverage build bustages (Bug 1739590).
Backed out changeset bba94c79f3e1 (bug 1732343)
Backed out changeset d30fa1e1f605 (bug 1732343)
Backed out changeset ed0b4f757c4b (bug 1732343)
Backed out changeset a272da134c34 (bug 1732343)
Backed out changeset ccb259d73843 (bug 1732343)
Backed out changeset a292990b62de (bug 1732343)
Backed out changeset 7d1854782ca8 (bug 1732343)
Backed out changeset 29eaabd9ffb3 (bug 1732343)
Backed out changeset 1aa26657a7a6 (bug 1732343)
Backed out changeset 7a6708dc620a (bug 1732343)
2021-11-05 07:21:04 -04:00
Nika Layzell
b8279164db Bug 1732343 - Part 2: Migrate all uses of base::FileDescriptor to UniqueFileHandle, r=handyman
This is useful for the following parts, as UniqueFileHandle is a cross-platform
type which can also be used to support transferring HANDLEs between processes.

This change requires fairly sweeping changes to existing callsites, which
previously did not require owning access to the handle types when transferring.
For the most part these changes were straightforward, but manual.

Differential Revision: https://phabricator.services.mozilla.com/D126564
2021-11-04 19:20:17 +00:00
Bob Owen
5cde6310ff Bug 1674834: Check that 2D Canvas recorder has initialized. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D95566
2020-11-04 15:32:02 +00:00
Bob Owen
e35330bd95 Bug 1641256: Don't deactivate remote canvas due to read error when the writer has already failed. r=jrmuizel
This also removes the gfxDevCrashes when an invalid enum is read, because we
suspect these are mainly due to the writer shutting down mid event.
We could only crash when the writer hasn't failed, but because these reads are
in templated code it would mean updating the different event streams with a new
function. If we are still getting high numbers in the deactivation telemetry we
will need to do this to try and track down the problem.

Differential Revision: https://phabricator.services.mozilla.com/D82493
2020-07-07 19:30:14 +00:00
Bob Owen
3ba9a0b436 Bug 1641722: Deactivate remote canvas 2D when device creation or stream read failure occurs. r=jrmuizel,chutten
This also adds telemetry probes to track:
* number of times remote canvas 2D is activated
* number of times remote canvas 2D is deactivated due to device creation failure
* number of times remote canvas 2D is deactivated due to a stream read error.

Differential Revision: https://phabricator.services.mozilla.com/D81032
2020-06-26 11:37:31 +00:00