src/java.desktop/unix/classes/sun/java2d/xr/XRCompositeManager.java

Print this page




  31 import java.security.AccessController;
  32 import java.security.PrivilegedAction;
  33 
  34 import sun.font.*;
  35 import sun.java2d.*;
  36 import sun.java2d.jules.*;
  37 import sun.java2d.loops.*;
  38 
  39 /**
  40  * Manages per-application resources, e.g. the 1x1 pixmap used for solid color
  41  * fill as well as per-application state e.g. the currently set source picture
  42  * used for composition .
  43  *
  44  * @author Clemens Eisserer
  45  */
  46 
  47 public class XRCompositeManager {
  48     private static boolean enableGradCache = true;
  49     private static XRCompositeManager instance;
  50 
  51     private final static int SOLID = 0;
  52     private final static int TEXTURE = 1;
  53     private final static int GRADIENT = 2;
  54 
  55     int srcType;
  56     XRSolidSrcPict solidSrc32;
  57     XRSurfaceData texture;
  58     XRSurfaceData gradient;
  59     int alphaMask = XRUtils.None;
  60 
  61     XRColor solidColor = new XRColor();
  62     float extraAlpha = 1.0f;
  63     byte compRule = XRUtils.PictOpOver;
  64     XRColor alphaColor = new XRColor();
  65 
  66     XRSurfaceData solidSrcPict;
  67     int alphaMaskPict;
  68     int gradCachePixmap;
  69     int gradCachePicture;
  70 
  71     boolean xorEnabled = false;
  72     int validatedPixel = 0;
  73     Composite validatedComp;




  31 import java.security.AccessController;
  32 import java.security.PrivilegedAction;
  33 
  34 import sun.font.*;
  35 import sun.java2d.*;
  36 import sun.java2d.jules.*;
  37 import sun.java2d.loops.*;
  38 
  39 /**
  40  * Manages per-application resources, e.g. the 1x1 pixmap used for solid color
  41  * fill as well as per-application state e.g. the currently set source picture
  42  * used for composition .
  43  *
  44  * @author Clemens Eisserer
  45  */
  46 
  47 public class XRCompositeManager {
  48     private static boolean enableGradCache = true;
  49     private static XRCompositeManager instance;
  50 
  51     private static final int SOLID = 0;
  52     private static final int TEXTURE = 1;
  53     private static final int GRADIENT = 2;
  54 
  55     int srcType;
  56     XRSolidSrcPict solidSrc32;
  57     XRSurfaceData texture;
  58     XRSurfaceData gradient;
  59     int alphaMask = XRUtils.None;
  60 
  61     XRColor solidColor = new XRColor();
  62     float extraAlpha = 1.0f;
  63     byte compRule = XRUtils.PictOpOver;
  64     XRColor alphaColor = new XRColor();
  65 
  66     XRSurfaceData solidSrcPict;
  67     int alphaMaskPict;
  68     int gradCachePixmap;
  69     int gradCachePicture;
  70 
  71     boolean xorEnabled = false;
  72     int validatedPixel = 0;
  73     Composite validatedComp;