Remove image's min size dependence on blocks count in dark mode.
With the blocks count fixed at 10, the images whose width or height is lesser than 10 cannot be classified as it leads to division with 0 scenarios while extracting the pixels from the bitmap. The blocks count is reduced when necessary depending on the width and height of |src_rect| so that the minimum size of the image doesn't have to be limited. Blocks count is maintained separately for horizontal and vertical directions as opposed to the current |kBlocksCount1D| that is used for both directions. A unit test is added to check the correctness and minor refactoring is done to the test file to avoid code repetition. Bug: 997569 Change-Id: Ib8776a033ca32f4d9b57c80d1bf7e6f0b31ecf5b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1772925 Commit-Queue: Varun Chowdhary Paturi <v.paturi@samsung.com> Reviewed-by:Stephen Chenney <schenney@chromium.org> Reviewed-by:
Prashant Nevase <prashant.n@samsung.com> Cr-Commit-Position: refs/heads/master@{#695916}
Showing
Please register or sign in to comment