src/java.desktop/unix/classes/sun/java2d/xr/XRSurfaceData.java
changeset 47838 f0c8554f0bce
parent 47216 71c04702a3d5
child 51305 331888ea4a78
equal deleted inserted replaced
47837:ef7aad81c3d6 47838:f0c8554f0bce
    31 import sun.awt.*;
    31 import sun.awt.*;
    32 import sun.java2d.InvalidPipeException;
    32 import sun.java2d.InvalidPipeException;
    33 import sun.java2d.SunGraphics2D;
    33 import sun.java2d.SunGraphics2D;
    34 import sun.java2d.SurfaceData;
    34 import sun.java2d.SurfaceData;
    35 import sun.java2d.SurfaceDataProxy;
    35 import sun.java2d.SurfaceDataProxy;
    36 import sun.java2d.jules.*;
       
    37 import sun.java2d.loops.*;
    36 import sun.java2d.loops.*;
    38 import sun.java2d.pipe.*;
    37 import sun.java2d.pipe.*;
    39 import sun.java2d.x11.*;
    38 import sun.java2d.x11.*;
    40 import sun.font.FontManagerNativeLibrary;
    39 import sun.font.FontManagerNativeLibrary;
    41 
    40 
   144                 }
   143                 }
   145                 // custom paints handled by super.validatePipe() below
   144                 // custom paints handled by super.validatePipe() below
   146             }
   145             }
   147         }
   146         }
   148 
   147 
   149         if (sg2d.antialiasHint == SunHints.INTVAL_ANTIALIAS_ON &&
   148         if (txPipe != null) {
   150             JulesPathBuf.isCairoAvailable())
   149             if (sg2d.transformState >= SunGraphics2D.TRANSFORM_TRANSLATESCALE) {
   151         {
   150                 sg2d.drawpipe = txPipe;
   152             sg2d.shapepipe = aaShapePipe;
   151                 sg2d.fillpipe = txPipe;
   153             sg2d.drawpipe = aaPixelToShapeConv;
   152             } else if (sg2d.strokeState != SunGraphics2D.STROKE_THIN) {
   154             sg2d.fillpipe = aaPixelToShapeConv;
   153                 sg2d.drawpipe = txPipe;
       
   154                 sg2d.fillpipe = nonTxPipe;
       
   155             } else {
       
   156                 sg2d.drawpipe = nonTxPipe;
       
   157                 sg2d.fillpipe = nonTxPipe;
       
   158             }
       
   159             sg2d.shapepipe = nonTxPipe;
   155         } else {
   160         } else {
   156             if (txPipe != null) {
   161             if (!validated) {
   157                 if (sg2d.transformState >= SunGraphics2D.TRANSFORM_TRANSLATESCALE) {
   162                 super.validatePipe(sg2d);
   158                     sg2d.drawpipe = txPipe;
       
   159                     sg2d.fillpipe = txPipe;
       
   160                 } else if (sg2d.strokeState != SunGraphics2D.STROKE_THIN) {
       
   161                     sg2d.drawpipe = txPipe;
       
   162                     sg2d.fillpipe = nonTxPipe;
       
   163                 } else {
       
   164                     sg2d.drawpipe = nonTxPipe;
       
   165                     sg2d.fillpipe = nonTxPipe;
       
   166                 }
       
   167                 sg2d.shapepipe = nonTxPipe;
       
   168             } else {
       
   169                 if (!validated) {
       
   170                     super.validatePipe(sg2d);
       
   171                 }
       
   172             }
   163             }
   173         }
   164         }
   174 
   165 
   175         // install the text pipe based on our earlier decision
   166         // install the text pipe based on our earlier decision
   176         sg2d.textpipe = textpipe;
   167         sg2d.textpipe = textpipe;
   526                 xrpipe = new XRRenderer(maskBuffer.getMaskBuffer());
   517                 xrpipe = new XRRenderer(maskBuffer.getMaskBuffer());
   527                 xrtxpipe = new PixelToShapeConverter(xrpipe);
   518                 xrtxpipe = new PixelToShapeConverter(xrpipe);
   528                 xrtextpipe = maskBuffer.getTextRenderer();
   519                 xrtextpipe = maskBuffer.getTextRenderer();
   529                 xrDrawImage = new XRDrawImage();
   520                 xrDrawImage = new XRDrawImage();
   530 
   521 
   531                 if (JulesPathBuf.isCairoAvailable()) {
       
   532                     aaShapePipe =
       
   533                        new JulesShapePipe(XRCompositeManager.getInstance(this));
       
   534                     aaPixelToShapeConv = new PixelToShapeConverter(aaShapePipe);
       
   535                 }
       
   536             } finally {
   522             } finally {
   537                 SunToolkit.awtUnlock();
   523                 SunToolkit.awtUnlock();
   538             }
   524             }
   539         }
   525         }
   540     }
   526     }