eclipsesource / eclipsesource/tabris-js
getImageData doesn't work on Windows if the canvas is not yet ready to draw
- Dominant language
- JavaScript
- Stars
- 1.4k
- Forks
- 171
- PR merge metrics
- No merged PRs in 30d
Description
The implementation of the canvas on windows is based on Win2D, a Direct2D based 2D graphics library by Microsoft. It creates the necessary Direct2D device resources asynchronously upon creation. Before it is ready, no operations can be executed on it. Draw operations are buffered and executed once the canvas becomes ready to draw. For getImageData that doesn't work as the ImageData must be returned synchronously. Waiting for the canvas to become ready when getImageData was called doesn't work because blocking the thread causes the canvas to never be ready. Solving that problem on the client would probably be a very extensive amount of work if at all possible, so we should add API that can deal with that issue.
Contributor guide
Assessment
This issue has not been assessed yet.