Canvas: Clean up BaseRenderingContext2D::getImageData
This function used to use the helper functions CopyToByteArray and ConvertPixelsFromCanvasPixelFormatToImageDataStorageFormat to first copy the data, then the convert formats. The function PaintImage::readPixels can do the copy and conversion simultaneously. Use that instead. Add the capability to read to uint16 (as well as uint8 and float16), since getImageData will be changed to allow specifying the type. Remove a bunch of unused helper functions left behind. Bug: 1115317 Change-Id: I88e637c2f314385c62b1a450ea2c0c9e7fc29ad9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2533833Reviewed-by:Yi Xu <yiyix@chromium.org> Reviewed-by:
Fernando Serboncini <fserb@chromium.org> Reviewed-by:
ccameron <ccameron@chromium.org> Commit-Queue: ccameron <ccameron@chromium.org> Cr-Commit-Position: refs/heads/master@{#827870}
Showing
Please register or sign in to comment