RFR: 8307132: Cleanup the code of sun.java2d.cmm.lcms package [v3]

Phil Race prr at openjdk.org
Wed May 24 22:30:59 UTC 2023


On Mon, 22 May 2023 17:20:22 GMT, Sergey Bylokhov <serb at openjdk.org> 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.
>
> Sergey Bylokhov has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains six additional commits since the last revision:
> 
>  - Merge branch 'openjdk:master' into cms_cleanup_v3
>  - split type and size
>  - add a comment
>  - Merge branch 'master' into cms_cleanup_v3
>  - Merge branch 'master' into cms_cleanup_v3
>  - 8307132: Cleanup the code of sun.java2d.cmm.lcms package

Marked as reviewed by prr (Reviewer).

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

PR Review: https://git.openjdk.org/jdk/pull/13732#pullrequestreview-1442831111



More information about the client-libs-dev mailing list