--- old/src/java.desktop/macosx/classes/sun/java2d/opengl/CGLVolatileSurfaceManager.java 2015-07-01 14:43:54.000000000 +0300 +++ new/src/java.desktop/macosx/classes/sun/java2d/opengl/CGLVolatileSurfaceManager.java 2015-07-01 14:43:54.000000000 +0300 @@ -45,7 +45,7 @@ public class CGLVolatileSurfaceManager extends VolatileSurfaceManager { - private boolean accelerationEnabled; + private final boolean accelerationEnabled; public CGLVolatileSurfaceManager(SunVolatileImage vImg, Object context) { super(vImg, context); @@ -53,18 +53,13 @@ /* * 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 image is not bitmask AND the GraphicsConfig supports the FBO + * extension */ int transparency = vImg.getTransparency(); - CGLGraphicsConfig gc = (CGLGraphicsConfig)vImg.getGraphicsConfig(); - accelerationEnabled = - (transparency == Transparency.OPAQUE) || - ((transparency == Transparency.TRANSLUCENT) && - (gc.isCapPresent(CAPS_EXT_FBOBJECT) || - gc.isCapPresent(CAPS_STORED_ALPHA))); + CGLGraphicsConfig gc = (CGLGraphicsConfig) vImg.getGraphicsConfig(); + accelerationEnabled = gc.isCapPresent(CAPS_EXT_FBOBJECT) + && transparency != Transparency.BITMASK; } protected boolean isAccelerationEnabled() { @@ -72,7 +67,7 @@ } /** - * Create a pbuffer-based SurfaceData object (or init the backbuffer + * Create a FBO-based SurfaceData object (or init the backbuffer * of an existing window if this is a double buffered GraphicsConfig) */ protected SurfaceData initAcceleratedSurface() { @@ -113,10 +108,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) { // TODO: modify parameter to delegate