RFR: 8300725: Improve performance of ColorConverOp for default destinations with alpha

Phil Race prr at openjdk.org
Fri Jan 20 16:27:35 UTC 2023


On Fri, 20 Jan 2023 06:02:53 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:

> The "default destination" for the ColorConverOp is used when the user passes "null" as the DST parameter. In this case, the "ColorConverOp.filter" creates the default image and uses ComponentColorModel: 8 bits per color component and optionally 8 bits for the alpha channel. For example for the ARGB source default destination will be RGBA format. Note that the RGBA format is not supported by BufferedImage directly, so the CUSTOM image type will be used.
> 
> Generic filtering of the CUSTOM image type is slow because we cannot pass that format directly to the CMM. But it would be good to support CUSTOM images that were created by the ColorConverOp.
> 
> Support of the default destination w/o alpha was implemented as part of the https://bugs.openjdk.org/browse/JDK-8005530. Since then we added support of the alpha to CMM code https://bugs.openjdk.org/browse/JDK-8012229.
> Now we can improve the performance of the default destination if it has the alpha channel.
> 
> The numbers for filtering opaque and transparent images to the null destination:
> <img width="705" alt="8300725" src="https://user-images.githubusercontent.com/14138494/213744370-241726f9-6653-403e-bb90-ce98fc089945.png">

The results look good.
I'll apply this patch and run all our automated tests. Although I doubt there'll be a failure it is prudent.
Please correct the spelling in the PR title. I already fixed the JBS issue.

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

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



More information about the client-libs-dev mailing list