summaryrefslogtreecommitdiffstats
path: root/gfx/layers/ipc/CanvasChild.h
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/layers/ipc/CanvasChild.h')
-rw-r--r--gfx/layers/ipc/CanvasChild.h20
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;