diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:33 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:33 +0000 |
commit | 086c044dc34dfc0f74fbe41f4ecb402b2cd34884 (patch) | |
tree | a4f824bd33cb075dd5aa3eb5a0a94af221bbe83a /gfx/layers/ipc/CanvasChild.h | |
parent | Adding debian version 124.0.1-1. (diff) | |
download | firefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.tar.xz firefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.zip |
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'gfx/layers/ipc/CanvasChild.h')
-rw-r--r-- | gfx/layers/ipc/CanvasChild.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/gfx/layers/ipc/CanvasChild.h b/gfx/layers/ipc/CanvasChild.h index c99fe50bfb..e22109f406 100644 --- a/gfx/layers/ipc/CanvasChild.h +++ b/gfx/layers/ipc/CanvasChild.h @@ -15,6 +15,10 @@ namespace mozilla { +namespace dom { +class ThreadSafeWorkerRef; +} + namespace gfx { class DrawTargetRecording; class SourceSurface; @@ -28,7 +32,7 @@ class CanvasChild final : public PCanvasChild, public SupportsWeakPtr { public: NS_INLINE_DECL_REFCOUNTING(CanvasChild) - CanvasChild(); + explicit CanvasChild(dom::ThreadSafeWorkerRef* aWorkerRef); /** * @returns true if remote canvas has been deactivated due to failure. @@ -58,7 +62,7 @@ class CanvasChild final : public PCanvasChild, public SupportsWeakPtr { * @params aTextureType the TextureType to create in the CanvasTranslator. */ void EnsureRecorder(gfx::IntSize aSize, gfx::SurfaceFormat aFormat, - TextureType aTextureType); + TextureType aTextureType, TextureType aWebglTextureType); /** * Clean up IPDL actor. @@ -147,6 +151,9 @@ class CanvasChild final : public PCanvasChild, public SupportsWeakPtr { void CleanupTexture(int64_t aTextureId); + void ReturnDataSurfaceShmem( + already_AddRefed<ipc::SharedMemoryBasic> aDataSurfaceShmem); + protected: void ActorDestroy(ActorDestroyReason aWhy) final; @@ -157,14 +164,6 @@ class CanvasChild final : public PCanvasChild, public SupportsWeakPtr { bool EnsureDataSurfaceShmem(gfx::IntSize aSize, gfx::SurfaceFormat aFormat); - void ReturnDataSurfaceShmem( - already_AddRefed<ipc::SharedMemoryBasic> aDataSurfaceShmem); - - struct DataShmemHolder { - RefPtr<ipc::SharedMemoryBasic> shmem; - RefPtr<CanvasChild> canvasChild; - }; - static void ReleaseDataShmemHolder(void* aClosure); void DropFreeBuffersWhenDormant(); @@ -173,6 +172,7 @@ class CanvasChild final : public PCanvasChild, public SupportsWeakPtr { static bool mDeactivated; + RefPtr<dom::ThreadSafeWorkerRef> mWorkerRef; RefPtr<CanvasDrawEventRecorder> mRecorder; RefPtr<ipc::SharedMemoryBasic> mDataSurfaceShmem; |