Skip to content

OffscreenCanvas support and Blob creation #93

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

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

UnrelatedString
Copy link

Description of the change

Adds a new module Graphics.Canvas.Offscreen containing bindings to the OffscreenCanvas interface, and adds bindings for HTMLCanvasElement.toBlob.

Semi-solves #75 -- doesn't directly allow creation of canvas elements, but gives a better purpose-built API for @thanacles' use case.

One thing that I haven't added because it somewhat worries me to add is transferControlToOffscreen. Given that it errors if the canvas has a context already, and getting a context on the canvas errors if it's been transferred, I'm unsure if simply allowing the JS to error within Effect is appropriate. Maybe it should just be prefixed unsafe?

I have also not added transferToImageBitmap, because there's no existing bindings for the ImageBitmap type and adding them seems like another far more involved PR's worth of work in and of itself.

I'm also worried about the aff 7.1.0 dependency imposed by aff-promise, mostly because I don't actually know how package sets work. I tried to use js-promise-aff, but Bower couldn't find it. I imagine it wouldn't be too difficult to remove the dependency entirely, but I'm in way over my head with anything async.


Checklist:

  • Added the change to the changelog's "Unreleased" section with a reference to this PR (e.g. "- Made a change (#0000)")
  • Linked any existing issues or proposals that this pull request should close
  • Updated or added relevant documentation
  • Added a test for the contribution (if applicable)

@UnrelatedString
Copy link
Author

(I also haven't actually tested any of this at all...)

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

Successfully merging this pull request may close these issues.

1 participant