src/solaris/classes/sun/java2d/xr/XRMaskBlit.java

Print this page




  67 
  68     public void MaskBlit(SurfaceData src, SurfaceData dst, Composite comp,
  69             Region clip, int srcx, int srcy, int dstx, int dsty, int width,
  70             int height, byte[] mask, int maskoff, int maskscan) {
  71         if (width <= 0 || height <= 0) {
  72             return;
  73         }
  74 
  75         try {
  76             SunToolkit.awtLock();
  77 
  78             XRSurfaceData x11sd = (XRSurfaceData) src;
  79             x11sd.validateAsSource(null, XRUtils.RepeatNone, XRUtils.FAST);
  80 
  81             XRCompositeManager maskBuffer = x11sd.maskBuffer;
  82             XRSurfaceData x11dst = (XRSurfaceData) dst;
  83             x11dst.validateAsDestination(null, clip);
  84 
  85             int maskPict = maskBuffer.getMaskBuffer().
  86                          uploadMask(width, height, maskscan, maskoff, mask);
  87             maskBuffer.XRComposite(x11sd.getPicture(), maskPict, x11sd.picture,
  88                                   srcx, srcy, 0, 0, dstx, dsty, width, height);
  89             maskBuffer.getMaskBuffer().clearUploadMask(maskPict, width, height);
  90         } finally {
  91             SunToolkit.awtUnlock();
  92         }
  93     }
  94 }


  67 
  68     public void MaskBlit(SurfaceData src, SurfaceData dst, Composite comp,
  69             Region clip, int srcx, int srcy, int dstx, int dsty, int width,
  70             int height, byte[] mask, int maskoff, int maskscan) {
  71         if (width <= 0 || height <= 0) {
  72             return;
  73         }
  74 
  75         try {
  76             SunToolkit.awtLock();
  77 
  78             XRSurfaceData x11sd = (XRSurfaceData) src;
  79             x11sd.validateAsSource(null, XRUtils.RepeatNone, XRUtils.FAST);
  80 
  81             XRCompositeManager maskBuffer = x11sd.maskBuffer;
  82             XRSurfaceData x11dst = (XRSurfaceData) dst;
  83             x11dst.validateAsDestination(null, clip);
  84 
  85             int maskPict = maskBuffer.getMaskBuffer().
  86                          uploadMask(width, height, maskscan, maskoff, mask);
  87             maskBuffer.XRComposite(x11sd.getPicture(), maskPict, x11dst.getPicture(),
  88                                   srcx, srcy, 0, 0, dstx, dsty, width, height);
  89             maskBuffer.getMaskBuffer().clearUploadMask(maskPict, width, height);
  90         } finally {
  91             SunToolkit.awtUnlock();
  92         }
  93     }
  94 }