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

List:       openjdk-2d-dev
Subject:    [OpenJDK 2D-Dev] Integrated: 8254788: Dead code in the sun.java2d.xr.XRPMBlitLoops$XrSwToPMBlit
From:       Sergey Bylokhov <serb () openjdk ! java ! net>
Date:       2020-10-20 17:38:12
Message-ID: L9y150C5TPBYUjZ9MJ5gAwLeDhvMOwELkqacUY_Hx-s=.f3a1c6e0-2995-4fc5-a045-5c0410bfd47f () github ! com
[Download RAW message or body]

On Wed, 14 Oct 2020 18:35:15 GMT, Sergey Bylokhov <serb@openjdk.org> wrote:

> The XrSwToPMBlit is a blit which is used as a direct(unscaled) blit of the image in \
> the memory to the pixmap. It tries to optimize the SrcOver composite in case of an \
> opaque source image and use Src instead: if (CompositeType.SrcOverNoEa.equals(comp) \
> && (src.getTransparency() == Transparency.OPAQUE)) { Blit opaqueSwToSurfaceBlit = \
> Blit.getFromCache(src.getSurfaceType(), CompositeType.SrcNoEa, \
> dst.getSurfaceType()); opaqueSwToSurfaceBlit.Blit(src, dst, comp, clip, sx, sy, dx, \
> dy, w, h); } else {
> 
> The code above does not work for two reasons:
> - The check "CompositeType.SrcOverNoEa.equals(comp)" always fails because the comp \
> is of type Composite(AlphaComposite/XORComposite/etc) not a CompositeType
> - This optimisation is applied already in the \
> sun.java2d.pipe.DrawImage#blitSurfaceData: \
> https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/sun/java2d/pipe/DrawImage.java#L933
> 

This pull request has now been integrated.

Changeset: 89e54445
Author:    Sergey Bylokhov <serb@openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/89e54445
Stats:     15 lines in 1 file changed: 0 ins; 6 del; 9 mod

8254788: Dead code in the sun.java2d.xr.XRPMBlitLoops$XrSwToPMBlit

Reviewed-by: prr

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

PR: https://git.openjdk.java.net/jdk/pull/665


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

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