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
11 changes: 2 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions cli/tsc/dts/lib.deno_webgpu.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1789,8 +1789,6 @@ declare interface GPUCanvasConfiguration {
viewFormats?: GPUTextureFormat[];
colorSpace?: "srgb" | "display-p3";
alphaMode?: GPUCanvasAlphaMode;
width: number;
height: number;
}
/**
* @category GPU
Expand Down
10 changes: 9 additions & 1 deletion ext/canvas/01_image.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ webidl.converters["ImageBitmapOptions"] = webidl.createDictionaryConverter(
],
);

/** images are stored as RGBA8 */
const _bitmapData = Symbol("[[bitmapData]]");
const _detached = Symbol("[[detached]]");
class ImageBitmap {
Expand Down Expand Up @@ -351,4 +352,11 @@ function getBitmapData(imageBitmap) {

internals.getBitmapData = getBitmapData;

export { _bitmapData, _detached, createImageBitmap, ImageBitmap };
export {
_bitmapData,
_detached,
_height,
_width,
createImageBitmap,
ImageBitmap,
};
Loading