< prev index next >

src/java.desktop/windows/classes/sun/java2d/opengl/WGLGraphicsConfig.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2004, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2015, 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
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -25,11 +25,10 @@
 
 package sun.java2d.opengl;
 
 import java.awt.AWTException;
 import java.awt.BufferCapabilities;
-import java.awt.BufferCapabilities.FlipContents;
 import java.awt.Color;
 import java.awt.Component;
 import java.awt.Graphics;
 import java.awt.Graphics2D;
 import java.awt.ImageCapabilities;

@@ -423,27 +422,15 @@
     @Override
     public VolatileImage
         createCompatibleVolatileImage(int width, int height,
                                       int transparency, int type)
     {
-        if (type == FLIP_BACKBUFFER || type == WINDOW || type == UNDEFINED ||
-            transparency == Transparency.BITMASK)
-        {
-            return null;
-        }
-
-        if (type == FBOBJECT) {
-            if (!isCapPresent(CAPS_EXT_FBOBJECT)) {
+        if ((type != FBOBJECT && type != TEXTURE)
+                || transparency == Transparency.BITMASK
+                || type == FBOBJECT && !isCapPresent(CAPS_EXT_FBOBJECT)) {
                 return null;
             }
-        } else if (type == PBUFFER) {
-            boolean isOpaque = transparency == Transparency.OPAQUE;
-            if (!isOpaque && !isCapPresent(CAPS_STORED_ALPHA)) {
-                return null;
-            }
-        }
-
         SunVolatileImage vi = new AccelTypedVolatileImage(this, width, height,
                                                           transparency, type);
         Surface sd = vi.getDestSurface();
         if (!(sd instanceof AccelSurface) ||
             ((AccelSurface)sd).getType() != type)
< prev index next >