On Tue, 17 Feb 2026 20:34:41 GMT, Alexey Ivanov <[email protected]> wrote:
>>>No, it doesn't work without & 0xFF. >> >> Initially, you suggested it without &FF, and my answer was about the text I >> quoted. >> >>> int expG = (argb >>> 8) & 0xFF; >> >> That is not necessary to use >>> shift for red and green, as well as >> plus >> &FF for blue. > > Not necessary, but using `>>>` doesn't change the result, and using the same > operator in all the three cases looks *consistent*. Why should it use the same operator for all of them if some are unnecessary? I prefer >>> for alpha because it works well without additional masking, and masking only for blue, which does not need a shift by zero. It is short and clean, and there is no need to align it beautifully just to make it look better. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29734#discussion_r2819007083
