mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-06 15:58:39 +09:00
import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo
This commit is contained in:
commit
dcd9973243
150858 changed files with 23884658 additions and 0 deletions
101
devtools/shared/specs/webgl.js
Normal file
101
devtools/shared/specs/webgl.js
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
"use strict";
|
||||
|
||||
const {Arg, Option, RetVal, generateActorSpec} = require("devtools/shared/protocol");
|
||||
|
||||
const shaderSpec = generateActorSpec({
|
||||
typeName: "gl-shader",
|
||||
|
||||
methods: {
|
||||
getText: {
|
||||
response: { text: RetVal("string") }
|
||||
},
|
||||
compile: {
|
||||
request: { text: Arg(0, "string") },
|
||||
response: { error: RetVal("nullable:json") }
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
exports.shaderSpec = shaderSpec;
|
||||
|
||||
const programSpec = generateActorSpec({
|
||||
typeName: "gl-program",
|
||||
|
||||
methods: {
|
||||
getVertexShader: {
|
||||
response: { shader: RetVal("gl-shader") }
|
||||
},
|
||||
getFragmentShader: {
|
||||
response: { shader: RetVal("gl-shader") }
|
||||
},
|
||||
highlight: {
|
||||
request: { tint: Arg(0, "array:number") },
|
||||
oneway: true
|
||||
},
|
||||
unhighlight: {
|
||||
oneway: true
|
||||
},
|
||||
blackbox: {
|
||||
oneway: true
|
||||
},
|
||||
unblackbox: {
|
||||
oneway: true
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
exports.programSpec = programSpec;
|
||||
|
||||
const webGLSpec = generateActorSpec({
|
||||
typeName: "webgl",
|
||||
|
||||
/**
|
||||
* Events emitted by this actor. The "program-linked" event is fired every
|
||||
* time a WebGL program was linked with its respective two shaders.
|
||||
*/
|
||||
events: {
|
||||
"program-linked": {
|
||||
type: "programLinked",
|
||||
program: Arg(0, "gl-program")
|
||||
},
|
||||
"global-destroyed": {
|
||||
type: "globalDestroyed",
|
||||
program: Arg(0, "number")
|
||||
},
|
||||
"global-created": {
|
||||
type: "globalCreated",
|
||||
program: Arg(0, "number")
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
setup: {
|
||||
request: { reload: Option(0, "boolean") },
|
||||
oneway: true
|
||||
},
|
||||
finalize: {
|
||||
oneway: true
|
||||
},
|
||||
getPrograms: {
|
||||
response: { programs: RetVal("array:gl-program") }
|
||||
},
|
||||
waitForFrame: {
|
||||
response: { success: RetVal("nullable:json") }
|
||||
},
|
||||
getPixel: {
|
||||
request: {
|
||||
selector: Option(0, "string"),
|
||||
position: Option(0, "json")
|
||||
},
|
||||
response: { pixels: RetVal("json") }
|
||||
},
|
||||
_getAllPrograms: {
|
||||
response: { programs: RetVal("array:gl-program") }
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
exports.webGLSpec = webGLSpec;
|
||||
Loading…
Add table
Add a link
Reference in a new issue