1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
4 /* This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
8 include protocol PCanvasManager;
9 include "mozilla/layers/LayersMessageUtils.h";
11 [MoveOnly] using class mozilla::ipc::BigBuffer from "mozilla/ipc/BigBuffer.h";
12 using mozilla::layers::RemoteTextureOwnerId from "mozilla/layers/LayersTypes.h";
13 using mozilla::layers::RemoteTextureTxnType from "mozilla/layers/LayersTypes.h";
14 using mozilla::layers::RemoteTextureTxnId from "mozilla/layers/LayersTypes.h";
15 using mozilla::layers::SurfaceDescriptor from "mozilla/layers/LayersTypes.h";
16 using std::string from "string";
17 using mozilla::uvec2 from "mozilla/dom/WebGLIpdl.h";
18 using mozilla::uvec3 from "mozilla/dom/WebGLIpdl.h";
19 using mozilla::void_t from "mozilla/ipc/IPCCore.h";
20 using mozilla::webgl::CompileResult from "mozilla/dom/WebGLIpdl.h";
21 using mozilla::webgl::ContextLossReason from "mozilla/dom/WebGLIpdl.h";
22 using mozilla::webgl::FrontBufferSnapshotIpc from "mozilla/dom/WebGLIpdl.h";
23 using mozilla::webgl::GetUniformData from "mozilla/dom/WebGLIpdl.h";
24 using mozilla::webgl::InitContextDesc from "mozilla/dom/WebGLIpdl.h";
25 using mozilla::webgl::InitContextResult from "mozilla/dom/WebGLIpdl.h";
26 using mozilla::webgl::Int32Vector from "mozilla/dom/WebGLIpdl.h";
27 using mozilla::webgl::LinkResult from "mozilla/dom/WebGLIpdl.h";
28 using mozilla::webgl::OpaqueFramebufferOptions from "mozilla/dom/WebGLIpdl.h";
29 using mozilla::webgl::PackingInfo from "mozilla/dom/WebGLIpdl.h";
30 using mozilla::webgl::ReadPixelsDesc from "mozilla/dom/WebGLIpdl.h";
31 using mozilla::webgl::ReadPixelsResultIpc from "mozilla/dom/WebGLIpdl.h";
32 using mozilla::webgl::ShaderPrecisionFormat from "mozilla/dom/WebGLIpdl.h";
33 [MoveOnly] using mozilla::webgl::TexUnpackBlobDesc from "mozilla/dom/WebGLIpdl.h";
38 union ReadPixelsBuffer {
39 // The buffer needs to be allocated, and the value specifies the maximum size.
41 // The buffer is a pre-allocated Shmem.
46 * Represents the connection between a WebGLChild actor that issues WebGL
47 * command from the content process, and a WebGLParent in the compositor
48 * process that runs the commands.
52 manager PCanvasManager;
55 sync Initialize(InitContextDesc desc)
56 returns (InitContextResult res);
60 async WaitForTxn(RemoteTextureOwnerId ownerId, RemoteTextureTxnType txnType, RemoteTextureTxnId txnId);
64 async DispatchCommands(BigBuffer commands, uint64_t size);
65 async Ping() returns (void_t ok);
67 async TexImage(uint32_t level, uint32_t respecFormat, uvec3 offset,
68 PackingInfo pi, TexUnpackBlobDesc src);
72 sync GetBufferSubData(uint32_t target, uint64_t srcByteOffset, uint64_t byteSize) returns (Shmem ret);
73 sync GetFrontBufferSnapshot() returns (FrontBufferSnapshotIpc ret);
74 sync ReadPixels(ReadPixelsDesc desc, ReadPixelsBuffer buffer) returns (ReadPixelsResultIpc ret);
78 sync CheckFramebufferStatus(uint32_t target) returns (uint32_t ret);
79 sync ClientWaitSync(uint64_t id, uint32_t flags, uint64_t timeout) returns (uint32_t ret);
80 sync CreateOpaqueFramebuffer(uint64_t id, OpaqueFramebufferOptions options) returns (bool ret);
81 sync DrawingBufferSize() returns (uvec2 ret);
83 sync GetBufferParameter(uint32_t target, uint32_t pname) returns (double? ret);
84 sync GetCompileResult(uint64_t id) returns (CompileResult ret);
85 sync GetError() returns (uint32_t ret);
86 sync GetFragDataLocation(uint64_t id, string name) returns (int32_t ret);
87 sync GetFramebufferAttachmentParameter(uint64_t id,
89 uint32_t pname) returns (double? ret);
90 sync GetFrontBuffer(uint64_t fb, bool vr) returns (SurfaceDescriptor? ret);
91 sync GetIndexedParameter(uint32_t target, uint32_t index) returns (double? ret);
92 sync GetInternalformatParameter(uint32_t target, uint32_t internalFormat, uint32_t pname) returns (Int32Vector? ret);
93 sync GetLinkResult(uint64_t id) returns (LinkResult ret);
94 sync GetNumber(uint32_t pname) returns (double? ret);
95 sync GetQueryParameter(uint64_t id, uint32_t pname) returns (double? ret);
96 sync GetRenderbufferParameter(uint64_t id, uint32_t pname) returns (double? ret);
97 sync GetSamplerParameter(uint64_t id, uint32_t pname) returns (double? ret);
98 sync GetShaderPrecisionFormat(
99 uint32_t shaderType, uint32_t precisionType) returns (ShaderPrecisionFormat? ret);
100 sync GetString(uint32_t pname) returns (string? ret);
101 sync GetTexParameter(uint64_t id, uint32_t pname) returns (double? ret);
102 sync GetUniform(uint64_t id, uint32_t loc) returns (GetUniformData ret);
103 sync GetVertexAttrib(uint32_t index, uint32_t pname) returns (double? ret);
104 sync OnMemoryPressure();
105 sync ValidateProgram(uint64_t id) returns (bool ret);
108 async JsWarning(string text);
110 // Tell client that this queue needs to be shut down
111 async OnContextLoss(ContextLossReason aReason);
113 // Triggered when the id from FenceSync completes.
114 async OnSyncComplete(uint64_t id);