Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
8254788: Dead code in the sun.java2d.xr.XRPMBlitLoops$XrSwToPMBlit
Reviewed-by: prr
  • Loading branch information
mrserb committed Oct 20, 2020
1 parent 3267b09 commit 89e5444
Showing 1 changed file with 9 additions and 15 deletions.
24 changes: 9 additions & 15 deletions src/java.desktop/unix/classes/sun/java2d/xr/XRPMBlitLoops.java
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -34,12 +34,12 @@
import java.awt.geom.*;
import java.lang.ref.*;

public class XRPMBlitLoops {
public final class XRPMBlitLoops {

static WeakReference<SunVolatileImage> argbTmpPM = new WeakReference<SunVolatileImage>(null);
static WeakReference<SunVolatileImage> rgbTmpPM = new WeakReference<SunVolatileImage>(null);

public XRPMBlitLoops() {
private XRPMBlitLoops() {
}

public static void register() {
Expand Down Expand Up @@ -355,19 +355,13 @@ class XrSwToPMBlit extends Blit {
}

public void Blit(SurfaceData src, SurfaceData dst, Composite comp, Region clip, int sx, int sy, int dx, int dy, int w, int h) {
// If the blit is write-only (putimge), no need for a temporary VI.
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 {
try {
SunToolkit.awtLock();
try {
SunToolkit.awtLock();

XRSurfaceData vImgSurface = XRPMBlitLoops.cacheToTmpSurface(src, (XRSurfaceData) dst, w, h, sx, sy);
pmToSurfaceBlit.Blit(vImgSurface, dst, comp, clip, 0, 0, dx, dy, w, h);
} finally {
SunToolkit.awtUnlock();
}
XRSurfaceData vImgSurface = XRPMBlitLoops.cacheToTmpSurface(src, (XRSurfaceData) dst, w, h, sx, sy);
pmToSurfaceBlit.Blit(vImgSurface, dst, comp, clip, 0, 0, dx, dy, w, h);
} finally {
SunToolkit.awtUnlock();
}
}
}
Expand Down

1 comment on commit 89e5444

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented on 89e5444 Oct 20, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.