Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
createImageBitmap: Fuse all operations
Consider the function CropImageAndApplyColorSpaceConversion. This function has separate steps for: - Crops - Down-scale - Flip - Color-convert (ish) - Re-orient (maybe) - Multiply or un-multiply alpha - Up-scale These are all separate steps that take an input image and produce an output image. These operations can (almost) all be fused into a single blit. Add the function ApplyImageBitmapOptionsTransformsWithBlit to do this single blit. Move only one createImageBitmap path to this. Once all paths move to this, we will remove the functions FlipImageVertically, ScaleImage, ApplyColorSpaceConversion, BakeOrientation, MakeBlankImage, CropImageAndApplyColorSpaceConversion, and the guts of a handful of ImageBitmap::ImageBitmap instances (ImageData I'm looking at you). This happens to fix one WPT test. Add a bunch more sub-tests for that test (all other browsers pass that test, along with the new sub-tests). This does not handle the case of unpremultiplied alpha, and falls back to the old path. A similar unpremultiplied alpha path will be added. Bug: 40773069, 362431889 Change-Id: Id39ec3aaa5e9b373397b5932ffd31984bcc8c4b5 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5890810 Commit-Queue: ccameron chromium <ccameron@chromium.org> Reviewed-by: Fernando Serboncini <fserb@chromium.org> Cr-Commit-Position: refs/heads/main@{#1362628}
- Loading branch information