Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ext/canvas): OffscreenCanvas #23773

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
Merge branch 'refs/heads/main' into offscreencanvas
# Conflicts:
#	ext/webgpu/02_surface.js
  • Loading branch information
crowlKats committed May 5, 2024
commit b6697240d350040d5b903fb345ecdbf52ed3c9aa
10 changes: 6 additions & 4 deletions ext/webgpu/02_surface.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,11 @@ const {

import * as webidl from "ext:deno_webidl/00_webidl.js";
import { createFilteredInspectProxy } from "ext:deno_console/01_console.js";
const { Symbol, SymbolFor, ObjectPrototypeIsPrototypeOf } = primordials;
import {
_device,
import { _device,
assertDevice,
createGPUTexture,
GPUTextureUsage,
} from "ext:deno_webgpu/01_webgpu.js";
loadWebGPU } from "ext:deno_webgpu/00_init.js";
import { DOMException } from "ext:deno_web/01_dom_exception.js";

const _surfaceRid = Symbol("[[surfaceRid]]");
Expand Down Expand Up @@ -349,6 +347,10 @@ webidl.converters["GPUCanvasAlphaMode"] = webidl.createEnumConverter(
"premultiplied",
],
);
// TODO(@littledivy): This will extend `OffscreenCanvas` when we add it.
class UnsafeWindowSurface {
#ctx;
#surfaceRid;

constructor(system, win, display) {
this.#surfaceRid = op_webgpu_surface_create(system, win, display);
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.