[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-2d-dev
Subject:    Integrated: 8297681: Unnecessary color conversion during 4BYTE_ABGR_PRE to INT_ARGB_PRE blit
From:       Sergey Bylokhov <serb () openjdk ! org>
Date:       2022-11-30 7:32:33
Message-ID: vT6zWyVG0NCIFZjUdPAl_HZdo54DiHm0wDD78_LgPCM=.a810d98f-8648-437f-a102-2ab022e41c3a () github ! com
[Download RAW message or body]

On Sun, 27 Nov 2022 06:26:48 GMT, Sergey Bylokhov <serb@openjdk.org> wrote:

> I have found that drawing the BufferedImage.4BYTE_ABGR_PRE to the INT_ARGB_PRE \
> image caused java2d to do an additional conversion from/to ARGB format. That \
> conversion is done via a native \
> [loop](https://github.com/openjdk/jdk/blob/739769c8fc4b496f08a92225a12d07414537b6c0/src/java.desktop/share/native/libawt/java2d/loops/AlphaMath.c#L32) \
> which tries to approximate the math,  it is better to skip such conversion. 
> An additional benefit is ~x2 performance improvements of this blit, so it will have \
> the same performance as the opposite INT_ARGB_PRE to 4BYTE_ABGR_PRE blit.  
> 
> global.dest=BufImg(IntArgbPre),graphics.imaging.src=4ByteAbgrPre
> translucent,graphics.opts.alpharule=Src,graphics.opts.sizes=100:
> fix: 286439.77665 (var=3.42%) (100.0%)
> ***********************************************************|
> ***********************************************************|
> ********************************************************** |
> base: 167280.80808 (var=1.8%) (58.4%)
> ********************************** |
> ********************************** |
> ********************************** | 
> 
> global.dest=BufImg(IntArgbPre),graphics.imaging.src=4ByteAbgrPre
> translucent,graphics.opts.alpharule=SrcOver,graphics.opts.sizes=100:
> fix: 325989.80002 (var=1.58%) (100.0%)
> *********************************************************** |
> ************************************************************|
> ************************************************************|
> base: 200830.44521 (var=1.58%) (61.61%)
> ************************************* |
> ************************************* |
> ************************************* | 
> 
> 
> To implement direct 4BYTE_ABGR_PRE to INT_ARGB_PRE blit it is necessary to \
> "declare" and "register" blit only, all other macros are already in place.

This pull request has now been integrated.

Changeset: 8ffed34e
Author:    Sergey Bylokhov <serb@openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/8ffed34e1da0ad2b9b6503f13831843dadfed319
                
Stats:     98 lines in 2 files changed: 97 ins; 0 del; 1 mod

8297681: Unnecessary color conversion during 4BYTE_ABGR_PRE to INT_ARGB_PRE blit

Reviewed-by: prr

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

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic