--- old/src/java.desktop/windows/classes/sun/java2d/opengl/WGLVolatileSurfaceManager.java 2015-06-14 21:44:16.000000000 +0300 +++ new/src/java.desktop/windows/classes/sun/java2d/opengl/WGLVolatileSurfaceManager.java 2015-06-14 21:44:16.000000000 +0300 @@ -29,7 +29,6 @@ import static java.awt.BufferCapabilities.FlipContents.*; import java.awt.Component; import java.awt.GraphicsConfiguration; -import java.awt.Transparency; import java.awt.image.ColorModel; import sun.awt.AWTAccessor; @@ -43,10 +42,9 @@ import sun.java2d.pipe.hw.ExtendedBufferCapabilities; import static sun.java2d.pipe.hw.ExtendedBufferCapabilities.VSyncType.*; -public class WGLVolatileSurfaceManager - extends VolatileSurfaceManager -{ - private boolean accelerationEnabled; +public class WGLVolatileSurfaceManager extends VolatileSurfaceManager { + + private final boolean accelerationEnabled; public WGLVolatileSurfaceManager(SunVolatileImage vImg, Object context) { super(vImg, context); @@ -54,18 +52,10 @@ /* * We will attempt to accelerate this image only under the * following conditions: - * - the image is opaque OR - * - the image is translucent AND - * - the GraphicsConfig supports the FBO extension OR - * - the GraphicsConfig has a stored alpha channel + * - the GraphicsConfig supports the FBO extension */ - int transparency = vImg.getTransparency(); WGLGraphicsConfig gc = (WGLGraphicsConfig)vImg.getGraphicsConfig(); - accelerationEnabled = - (transparency == Transparency.OPAQUE) || - ((transparency == Transparency.TRANSLUCENT) && - (gc.isCapPresent(CAPS_EXT_FBOBJECT) || - gc.isCapPresent(CAPS_STORED_ALPHA))); + accelerationEnabled = gc.isCapPresent(CAPS_EXT_FBOBJECT); } protected boolean isAccelerationEnabled() { @@ -111,10 +101,9 @@ ColorModel cm = gc.getColorModel(vImg.getTransparency()); int type = vImg.getForcedAccelSurfaceType(); // if acceleration type is forced (type != UNDEFINED) then - // use the forced type, otherwise choose one based on caps + // use the forced type, otherwise choose FBOBJECT if (type == OGLSurfaceData.UNDEFINED) { - type = gc.isCapPresent(CAPS_EXT_FBOBJECT) ? - OGLSurfaceData.FBOBJECT : OGLSurfaceData.PBUFFER; + type = OGLSurfaceData.FBOBJECT; } if (createVSynced) { sData = WGLSurfaceData.createData(peer, vImg, type);