Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clipboard: Allow more flexibility in when PNGs are encoded on Chrome OS
While transitioning to reading images as PNGs from the clipboard, we changed the backing store of images on Chrome OS to be raw PNG bytes rather than bitmaps. The naive implementation meant encoding bitmaps as PNGs on the UI thread, which is not acceptable behavior going forward. This CL removes the ability to read images as bitmaps. Only allowing images to be read as PNGs greatly reduces the number of states the clipboard can be in. Images must be encoded to PNG format before they are read. This CL allows the owner of the clipboard to determine the best time to encode the bitmap to a PNG by temporarily storing the bitmap for as long as the PNG has not yet been encoded. This enables the owner to encode the PNG on a background thread at a time it chooses. Bug: 1247356 Change-Id: Ia87a42b3eb64725662eee97f853488342c99473e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3260985 Reviewed-by: Gary Kacmarcik <garykac@chromium.org> Reviewed-by: Alex Newcomer <newcomer@chromium.org> Reviewed-by: Xiyuan Xia <xiyuan@chromium.org> Reviewed-by: Francois Pierre Doray <fdoray@chromium.org> Reviewed-by: Aya Elsayed <ayaelattar@chromium.org> Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org> Reviewed-by: Yuichiro Hanada <yhanada@chromium.org> Reviewed-by: Olivier Li <olivierli@chromium.org> Commit-Queue: Austin Sullivan <asully@chromium.org> Cr-Commit-Position: refs/heads/main@{#948608}
- Loading branch information
Showing
17 changed files
with
598 additions
and
82 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
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
Oops, something went wrong.