summaryrefslogtreecommitdiff
path: root/src/sketch/web.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/sketch/web.zig')
-rw-r--r--src/sketch/web.zig5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/sketch/web.zig b/src/sketch/web.zig
index 682bff6..937b491 100644
--- a/src/sketch/web.zig
+++ b/src/sketch/web.zig
@@ -43,6 +43,7 @@ const js = struct {
/// A `Dispatch` or a `Pass`, described in JSON (see `describe`).
extern "gpu" fn compute(ptr: [*]const u8, len: usize) void;
extern "gpu" fn pass(ptr: [*]const u8, len: usize) void;
+ extern "gpu" fn postProcess(ptr: [*]const u8, len: usize) void;
/// Answers through `sk_download`.
extern "gpu" fn download(id: u32, offset: u32, size: u32, key: u32) void;
extern "audio" fn rate() u32;
@@ -234,6 +235,10 @@ fn Driver(comptime App: type) type {
const json = describe(v);
js.pass(json.ptr, json.len);
},
+ .post_process => |v| {
+ const json = describe(v);
+ js.postProcess(json.ptr, json.len);
+ },
.download => |v| js.download(@backingInt(v.buffer), v.offset, v.size, v.key),
.open_file => |v| js.openFile(v.command.ptr, v.command.len, v.pattern.ptr, v.pattern.len),
// Synthesised voices are not on the web yet; quitting a page