no bug - Bumping Firefox l10n changesets r=release a=l10n-bump DONTBUILD CLOSED TREE
[gecko.git] / dom / canvas / PWebGL.ipdl
bloba49d41e582cde21379fed040aa1ff51046ee0774
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2  * vim: sw=2 ts=8 et :
3  */
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";
35 namespace mozilla {
36 namespace dom {
38 union ReadPixelsBuffer {
39   // The buffer needs to be allocated, and the value specifies the maximum size.
40   uint64_t;
41   // The buffer is a pre-allocated Shmem.
42   Shmem;
45 /**
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.
49  */
50 sync protocol PWebGL
52   manager PCanvasManager;
54 parent:
55   sync Initialize(InitContextDesc desc)
56     returns (InitContextResult res);
58   async __delete__();
60   async WaitForTxn(RemoteTextureOwnerId ownerId, RemoteTextureTxnType txnType, RemoteTextureTxnId txnId);
62   // -
64   async DispatchCommands(BigBuffer commands, uint64_t size);
65   async Ping() returns (void_t ok);
66   sync SyncPing();
67   async TexImage(uint32_t level, uint32_t respecFormat, uvec3 offset,
68                  PackingInfo pi, TexUnpackBlobDesc src);
70   // -
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);
76   // -
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);
82   sync Finish();
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,
88                                                   uint32_t attachment,
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 IsEnabled(uint32_t cap) returns (bool ret);
105   sync OnMemoryPressure();
106   sync ValidateProgram(uint64_t id) returns (bool ret);
108 child:
109   async JsWarning(string text);
111   // Tell client that this queue needs to be shut down
112   async OnContextLoss(ContextLossReason aReason);
115 } // dom
116 } // mozilla