Print this page
Added gradle and cmake project


  34 import sun.java2d.SunGraphics2D;
  35 
  36 /**
  37  *   GraphicsComponentMgr provides services to
  38  *   1. register primitives for later use
  39  *   2. locate an instance of a primitve based on characteristics
  40  */
  41 public final class GraphicsPrimitiveMgr {
  42 
  43     private static final boolean debugTrace = false;
  44     private static GraphicsPrimitive[] primitives;
  45     private static GraphicsPrimitive[] generalPrimitives;
  46     private static boolean needssort = true;
  47 
  48     private static native void initIDs(Class<?> GP, Class<?> ST, Class<?> CT,
  49                                        Class<?> SG2D, Class<?> Color, Class<?> AT,
  50                                        Class<?> XORComp, Class<?> AlphaComp,
  51                                        Class<?> Path2D, Class<?> Path2DFloat,
  52                                        Class<?> SHints);
  53     private static native void registerNativeLoops();

  54 
  55     static {
  56         initIDs(GraphicsPrimitive.class,
  57                 SurfaceType.class,
  58                 CompositeType.class,
  59                 SunGraphics2D.class,
  60                 java.awt.Color.class,
  61                 java.awt.geom.AffineTransform.class,
  62                 XORComposite.class,
  63                 java.awt.AlphaComposite.class,
  64                 java.awt.geom.Path2D.class,
  65                 java.awt.geom.Path2D.Float.class,
  66                 sun.awt.SunHints.class);
  67         CustomComponent.register();
  68         GeneralRenderer.register();
  69         registerNativeLoops();
  70     }
  71 
  72     private static class PrimitiveSpec {
  73         public int uniqueID;




  34 import sun.java2d.SunGraphics2D;
  35 
  36 /**
  37  *   GraphicsComponentMgr provides services to
  38  *   1. register primitives for later use
  39  *   2. locate an instance of a primitve based on characteristics
  40  */
  41 public final class GraphicsPrimitiveMgr {
  42 
  43     private static final boolean debugTrace = false;
  44     private static GraphicsPrimitive[] primitives;
  45     private static GraphicsPrimitive[] generalPrimitives;
  46     private static boolean needssort = true;
  47 
  48     private static native void initIDs(Class<?> GP, Class<?> ST, Class<?> CT,
  49                                        Class<?> SG2D, Class<?> Color, Class<?> AT,
  50                                        Class<?> XORComp, Class<?> AlphaComp,
  51                                        Class<?> Path2D, Class<?> Path2DFloat,
  52                                        Class<?> SHints);
  53     private static native void registerNativeLoops();
  54     static native void setTraceFlags(int traceflags);
  55 
  56     static {
  57         initIDs(GraphicsPrimitive.class,
  58                 SurfaceType.class,
  59                 CompositeType.class,
  60                 SunGraphics2D.class,
  61                 java.awt.Color.class,
  62                 java.awt.geom.AffineTransform.class,
  63                 XORComposite.class,
  64                 java.awt.AlphaComposite.class,
  65                 java.awt.geom.Path2D.class,
  66                 java.awt.geom.Path2D.Float.class,
  67                 sun.awt.SunHints.class);
  68         CustomComponent.register();
  69         GeneralRenderer.register();
  70         registerNativeLoops();
  71     }
  72 
  73     private static class PrimitiveSpec {
  74         public int uniqueID;