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

Implement HTMLCanvasElement's transferControlToOffscreen API #24273

Open
jdm opened this issue Sep 24, 2019 · 1 comment
Open

Implement HTMLCanvasElement's transferControlToOffscreen API #24273

jdm opened this issue Sep 24, 2019 · 1 comment

Comments

@jdm
Copy link
Member

@jdm jdm commented Sep 24, 2019

The canvas API supports taking an existing HTMLCanvasElement, calling the transferControlToOffscreen method and obtaining a new OffscreenCanvas which wraps the existing canvas state. The existing canvas element changes its mode to the placeholder mode, and its content is only updated when calling the commit method of the new OffscreenCanvas.

WebIDL:

Code:

  • components/script/dom/webidls/HTMLCanvasElement.webidl
  • components/script/dom/webidls/OffscreenCanvasRenderingContext2D.webidl
  • components/script/dom/htmlcanvaselement.rs
  • components/script/dom/offscreenrenderingcontext2d.rs

Tests: ./mach test-wpt tests/wpt/web-platform-tests/offscreen-canvas/the-canvas-element

@gterzian
Copy link
Member

@gterzian gterzian commented Sep 24, 2019

The comment at #24272 (comment) applies to this as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.