-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add img.decode() API for "predecoding" images
This API allows the author to request that the user agent decode the image, preferably off the main thread, so that when the returned promise fulfills, the image is ready to be inserted into the document, without causing dropped frames due to decoding delay. Notable design choices made: - Rejects for non-active documents (or documents that become non-active) - Immediately fulfills for vector graphics or other formats that do not require decoding - Fulfills for animated images after all of their frames are loaded, not just the first, ensuring jank-free animation Closes #2037. This also includes the editorial change of giving a <dfn> to the "update the rendering" step, and linking to it where it is mentioned.
- Loading branch information
Showing
1 changed file
with
167 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters