On Fri, 28 Apr 2023 21:34:36 GMT, Sergey Bylokhov <[email protected]> wrote:

> The description from big to small:
> 
> - Our code to handle the image types we support is too generic, the 
> LCMSImageLayout class can handle, byte, short, int, and double types, and 
> many various properties of the image layout. As a result, we pass a couple of 
> good parameters to the LCMSImageLayout and have to use safeXX methods in it 
> to calculate the final layout, and then validate it.
>   This patch moves the layout properties calculation to one place - the 
> constructor of LCMSImageLayout, and from the outside of the class, we now 
> pass only the data array and the number of components per pixel:
>  - The usage of Double type is removed, we do not use that type currently, 
> and do not plan to support it in the future. Note that we support the float 
> type, and I tried to implement it, but unfortunately, it is [intentionally 
> ](https://github.com/mm2/Little-CMS/issues/356)slow. So will continue to use 
> short type instead of float.
>  - Discussed a few times the  `do { } while (false);` block is removed.

This pull request has now been integrated.

Changeset: f27bc59f
Author:    Sergey Bylokhov <[email protected]>
URL:       
https://git.openjdk.org/jdk/commit/f27bc59f85d5ea3df1f6b0b0a3932bab37d74709
Stats:     209 lines in 3 files changed: 11 ins; 116 del; 82 mod

8307132: Cleanup the code of sun.java2d.cmm.lcms package

Reviewed-by: prr

-------------

PR: https://git.openjdk.org/jdk/pull/13732

Reply via email to