< prev index next >

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

Print this page




 352         if (validatedXorComp != null) {
 353             renderQueue.setGCMode(xgc, true);
 354             renderQueue.setGCForeground(xgc, validatedGCForegroundPixel);
 355             validatedXorComp = null;
 356         }
 357     }
 358 
 359     public boolean copyArea(SunGraphics2D sg2d, int x, int y, int w, int h,
 360                             int dx, int dy) {
 361         if (xrpipe == null) {
 362             if (!isXRDrawableValid()) {
 363                 return true;
 364             }
 365             makePipes();
 366         }
 367         CompositeType comptype = sg2d.imageComp;
 368         if (sg2d.transformState < SunGraphics2D.TRANSFORM_TRANSLATESCALE &&
 369             (CompositeType.SrcOverNoEa.equals(comptype) ||
 370              CompositeType.SrcNoEa.equals(comptype)))
 371         {
 372             x += sg2d.transX;
 373             y += sg2d.transY;
 374             try {
 375                 SunToolkit.awtLock();
 376                 boolean needExposures = canSourceSendExposures(x, y, w, h);
 377                 validateCopyAreaGC(sg2d.getCompClip(), needExposures);
 378                 renderQueue.copyArea(xid, xid, xgc, x, y, w, h, x + dx, y + dy);
 379             } finally {
 380                 SunToolkit.awtUnlock();
 381             }
 382             return true;
 383         }
 384         return false;
 385     }
 386 
 387     /**
 388      * Returns the XRender SurfaceType which is able to fullfill the specified
 389      * transparency requirement.
 390      */
 391     public static SurfaceType getSurfaceType(XRGraphicsConfig gc,
 392                                              int transparency) {
 393         SurfaceType sType = null;




 352         if (validatedXorComp != null) {
 353             renderQueue.setGCMode(xgc, true);
 354             renderQueue.setGCForeground(xgc, validatedGCForegroundPixel);
 355             validatedXorComp = null;
 356         }
 357     }
 358 
 359     public boolean copyArea(SunGraphics2D sg2d, int x, int y, int w, int h,
 360                             int dx, int dy) {
 361         if (xrpipe == null) {
 362             if (!isXRDrawableValid()) {
 363                 return true;
 364             }
 365             makePipes();
 366         }
 367         CompositeType comptype = sg2d.imageComp;
 368         if (sg2d.transformState < SunGraphics2D.TRANSFORM_TRANSLATESCALE &&
 369             (CompositeType.SrcOverNoEa.equals(comptype) ||
 370              CompositeType.SrcNoEa.equals(comptype)))
 371         {


 372             try {
 373                 SunToolkit.awtLock();
 374                 boolean needExposures = canSourceSendExposures(x, y, w, h);
 375                 validateCopyAreaGC(sg2d.getCompClip(), needExposures);
 376                 renderQueue.copyArea(xid, xid, xgc, x, y, w, h, x + dx, y + dy);
 377             } finally {
 378                 SunToolkit.awtUnlock();
 379             }
 380             return true;
 381         }
 382         return false;
 383     }
 384 
 385     /**
 386      * Returns the XRender SurfaceType which is able to fullfill the specified
 387      * transparency requirement.
 388      */
 389     public static SurfaceType getSurfaceType(XRGraphicsConfig gc,
 390                                              int transparency) {
 391         SurfaceType sType = null;


< prev index next >