Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
shapedetection: Let SkBitmap calculate minimum valid value for rowBytes
In order to align with the expectation of SkBitmap.rowBytes() equal to SkBitmap.info().minRowBytes() in bitmap_skbitmap_mojom_traits.cc, pass 0 for rowBytes parameter when calling SkBitmap.tryAllocPixels() for SkBitmap to calculate minimum valid value for rowBytes. A new shape-detection WPT test is added to test if detectors can process ImageData with uint16 storage format properly which is the case where minimal row bytes is half of the image row bytes. Bug: 1242240 Change-Id: I4399e5c2cbda853cf6c5a5d269eea46d226a958b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3919646 Reviewed-by: Reilly Grant <[email protected]> Commit-Queue: Jack Hsieh <[email protected]> Cr-Commit-Position: refs/heads/main@{#1052249}
- Loading branch information