[prev in list] [next in list] [prev in thread] [next in thread]
List: openjdk-2d-dev
Subject: Integrated: 8318850: Duplicate code in the LCMSImageLayout
From: Sergey Bylokhov <serb () openjdk ! org>
Date: 2023-10-27 18:24:42
Message-ID: pMH_SJh_mZuMCR6ZxaXXjwPoCNUXFtQxJvm9A2qc2XY=.65838d36-6b83-4a36-bc4c-65a7ef89dc77 () github ! com
[Download RAW message or body]
On Thu, 26 Oct 2023 01:14:57 GMT, Sergey Bylokhov <serb@openjdk.org> wrote:
> Small cleanup:
> * The code to handle the TYPE_XBYTE_XX and TYPE_BYTE_GRAY in the LCMSImageLayout \
> class is mostly identical, there is only one difference in offset calculation
> int firstBand = byteRaster.getSampleModel().getNumBands() - 1;
> l.offset = byteRaster.getDataOffset(firstBand);
> or
> l.offset = byteRaster.getDataOffset(0);
>
> But since the TYPE_BYTE_GRAY has only one band, both codes calculate the same \
> value. so we can simply remove the special branch for TYPE_BYTE_GRAY
> * the PREMUL_SH method is replaced by the constant PREMUL since we always pass the \
> "1" as a parameter
This pull request has now been integrated.
Changeset: d2260146
Author: Sergey Bylokhov <serb@openjdk.org>
URL: https://git.openjdk.org/jdk/commit/d2260146c9930002e430a874f2585d699dedc155
Stats: 75 lines in 2 files changed: 57 ins; 11 del; 7 mod
8318850: Duplicate code in the LCMSImageLayout
Reviewed-by: prr
-------------
PR: https://git.openjdk.org/jdk/pull/16371
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic