Esempio n. 1
0
  public boolean copyArea(SunGraphics2D sg2d, int x, int y, int w, int h, int dx, int dy) {
    if (sg2d.transformState < sg2d.TRANSFORM_TRANSLATESCALE
        && sg2d.compositeState < sg2d.COMP_XOR) {
      x += sg2d.transX;
      y += sg2d.transY;

      oglRenderPipe.copyArea(sg2d, x, y, w, h, dx, dy);

      return true;
    }
    return false;
  }
Esempio n. 2
0
  static {
    if (!GraphicsEnvironment.isHeadless()) {
      // fbobject currently enabled by default; use "false" to disable
      String fbo =
          (String)
              java.security.AccessController.doPrivileged(
                  new sun.security.action.GetPropertyAction("sun.java2d.opengl.fbobject"));
      isFBObjectEnabled = !"false".equals(fbo);

      // lcdshader currently enabled by default; use "false" to disable
      String lcd =
          (String)
              java.security.AccessController.doPrivileged(
                  new sun.security.action.GetPropertyAction("sun.java2d.opengl.lcdshader"));
      isLCDShaderEnabled = !"false".equals(lcd);

      // biopshader currently enabled by default; use "false" to disable
      String biop =
          (String)
              java.security.AccessController.doPrivileged(
                  new sun.security.action.GetPropertyAction("sun.java2d.opengl.biopshader"));
      isBIOpShaderEnabled = !"false".equals(biop);

      // gradshader currently enabled by default; use "false" to disable
      String grad =
          (String)
              java.security.AccessController.doPrivileged(
                  new sun.security.action.GetPropertyAction("sun.java2d.opengl.gradshader"));
      isGradShaderEnabled = !"false".equals(grad);

      OGLRenderQueue rq = OGLRenderQueue.getInstance();
      oglImagePipe = new OGLDrawImage();
      oglTextPipe = new OGLTextRenderer(rq);
      oglRenderPipe = new OGLRenderer(rq);
      if (GraphicsPrimitive.tracingEnabled()) {
        oglTextPipe = oglTextPipe.traceWrap();
        // The wrapped oglRenderPipe will wrap the AA pipe as well...
        // oglAAPgramPipe = oglRenderPipe.traceWrap();
      }
      oglAAPgramPipe = oglRenderPipe.getAAParallelogramPipe();
      oglTxRenderPipe =
          new PixelToParallelogramConverter(oglRenderPipe, oglRenderPipe, 1.0, 0.25, true);

      OGLBlitLoops.register();
      OGLMaskFill.register();
      OGLMaskBlit.register();
    }
  }