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

List:       openjdk-2d-dev
Subject:    Re: RFR: 8297681: Unnecessary color conversion during 4BYTE_ABGR_PRE to INT_ARGB_PRE blit
From:       Phil Race <prr () openjdk ! org>
Date:       2022-11-29 18:08:14
Message-ID: 7HwljxyHGn0-J2qzyAXWOLseMaJypixadxczYd1PZq8=.6e401f64-76fc-4699-b65e-b8fd69248bcb () 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.

Marked as reviewed by prr (Reviewer).

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

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