< prev index next >

src/java.desktop/macosx/classes/sun/java2d/metal/MTLVolatileSurfaceManager.java

Print this page




  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package sun.java2d.metal;
  27 
  28 import sun.awt.AWTAccessor;
  29 import sun.awt.AWTAccessor.ComponentAccessor;
  30 import sun.awt.image.SunVolatileImage;
  31 import sun.awt.image.VolatileSurfaceManager;
  32 import sun.java2d.BackBufferCapsProvider;
  33 import sun.java2d.SurfaceData;
  34 import sun.java2d.opengl.OGLSurfaceData;
  35 import sun.java2d.pipe.hw.ExtendedBufferCapabilities;
  36 
  37 import java.awt.*;
  38 import java.awt.image.ColorModel;
  39 import java.awt.peer.ComponentPeer;
  40 
  41 import static java.awt.BufferCapabilities.FlipContents.COPIED;
  42 import static sun.java2d.opengl.OGLContext.OGLContextCaps.CAPS_EXT_FBOBJECT;
  43 import static sun.java2d.pipe.hw.ExtendedBufferCapabilities.VSyncType.VSYNC_ON;
  44 
  45 public class MTLVolatileSurfaceManager extends VolatileSurfaceManager {
  46 
  47     private final boolean accelerationEnabled;
  48 
  49     public MTLVolatileSurfaceManager(SunVolatileImage vImg, Object context) {
  50         super(vImg, context);
  51 
  52         /*
  53          * We will attempt to accelerate this image only under the
  54          * following conditions:
  55          *   - the image is not bitmask AND the GraphicsConfig supports the FBO
  56          *     extension
  57          */
  58         int transparency = vImg.getTransparency();
  59         MTLGraphicsConfig gc = (MTLGraphicsConfig) vImg.getGraphicsConfig();
  60         accelerationEnabled = true;
  61                 //gc.isCapPresent(CAPS_EXT_FBOBJECT)
  62                 //&& transparency != Transparency.BITMASK;




  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package sun.java2d.metal;
  27 
  28 import sun.awt.AWTAccessor;
  29 import sun.awt.AWTAccessor.ComponentAccessor;
  30 import sun.awt.image.SunVolatileImage;
  31 import sun.awt.image.VolatileSurfaceManager;
  32 import sun.java2d.BackBufferCapsProvider;
  33 import sun.java2d.SurfaceData;
  34 import sun.java2d.opengl.OGLSurfaceData;
  35 import sun.java2d.pipe.hw.ExtendedBufferCapabilities;
  36 
  37 import java.awt.*;
  38 import java.awt.image.ColorModel;
  39 import java.awt.peer.ComponentPeer;
  40 
  41 import static java.awt.BufferCapabilities.FlipContents.COPIED;
  42 //import static sun.java2d.opengl.OGLContext.OGLContextCaps.CAPS_EXT_FBOBJECT;
  43 import static sun.java2d.pipe.hw.ExtendedBufferCapabilities.VSyncType.VSYNC_ON;
  44 
  45 public class MTLVolatileSurfaceManager extends VolatileSurfaceManager {
  46 
  47     private final boolean accelerationEnabled;
  48 
  49     public MTLVolatileSurfaceManager(SunVolatileImage vImg, Object context) {
  50         super(vImg, context);
  51 
  52         /*
  53          * We will attempt to accelerate this image only under the
  54          * following conditions:
  55          *   - the image is not bitmask AND the GraphicsConfig supports the FBO
  56          *     extension
  57          */
  58         int transparency = vImg.getTransparency();
  59         MTLGraphicsConfig gc = (MTLGraphicsConfig) vImg.getGraphicsConfig();
  60         accelerationEnabled = true;
  61                 //gc.isCapPresent(CAPS_EXT_FBOBJECT)
  62                 //&& transparency != Transparency.BITMASK;


< prev index next >