Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow reading back from canvases after present (#2905)
* Allow reading back from canvases after present This allows drawImage/toDataURL/etc. to see the canvas contents presented in the previous frame, as long as getCurrentTexture (or configure/unconfigure) hasn't been called yet this frame. alphaMode (née compositingAlphaMode) now affects using the canvas as an image source (drawImage/etc.) as well as compositing, so that the observed contents don't change on a frame boundary. As a weird aside (necessary to fully define the image source behavior), defines super-luminant values as being in the extended color space (i.e. once un-premultiplied). This definition emerges naturally, but it's also weird. Fixes #2743 Fixes #1847 Fixes a leftover bit from #2373 (placeholder canvases) * nit * Remove the "cancel present" behavior of destroy() This fixes several problems: - Unnecessary complexity in how currentTexture logic works. - Errors in the previous commit, where this was just not fully handled. - Using the "destroyed" state on the content process (minor issue). * nits * nit
- Loading branch information