skia2/experimental/wasm-skp-debugger/externs.js
Nathaniel Nifong 0b448daafb Add a method of returning the list of commands that use an image
Change-Id: I3c94f7b6faa71ab0cbeccddd2032b657e350c9b3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316843
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-09-16 15:57:40 +00:00

62 lines
1.5 KiB
JavaScript

// TODO(nifong): Complete this before turning on clojure optimizations in compile.sh
var DebuggerView = {
MakeSWCanvasSurface: function() {},
_getRasterDirectSurface: function() {},
_malloc: function() {},
_free: function() {},
onRuntimeInitialized: function() {},
SkpFilePlayer: function() {},
MakeWebGLCanvasSurface: function() {},
MakeGrContext: function() {},
MakeOnScreenGLSurface: function() {},
MakeCanvasSurface: function() {},
ColorType: {
RGBA_8888: {},
},
AlphaType: {
Unpremul: {},
},
TRANSPARENT: {},
SkSurface: {
// public API (from C++ bindings)
/** @return {DebuggerView.SkCanvas} */
getCanvas: function() {},
// private API
_flush: function() {},
delete: function() {},
},
SkpDebugPlayer: {
SkpDebugPlayer: function() {},
loadSkp: function() {},
drawTo: function() {},
getBounds: function() {},
setOverdrawVis: function() {},
setGpuOpBounds: function() {},
setClipVizColor: function() {},
getSize: function() {},
deleteCommand: function() {},
setCommandVisibility: function() {},
jsonCommandList: function() {},
lastCommandInfo: function() {},
imageUseInfoForFrame: function() {},
},
/**
* @type {Uint8Array}
*/
HEAPU8: {},
};
// Public API things that are newly declared in the JS should go here.
// It's not enough to declare them above, because closure can still erase them
// unless they go on the prototype.
DebuggerView.SkSurface.prototype.flush = function() {};
DebuggerView.SkSurface.prototype.dispose = function() {};