< prev index next >

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

Print this page




  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package sun.java2d.xr;
  27 
  28 import java.awt.geom.*;
  29 import java.util.*;
  30 
  31 import sun.font.*;
  32 import sun.java2d.jules.*;
  33 import sun.java2d.pipe.*;
  34 
  35 import static sun.java2d.xr.XRUtils.XDoubleToFixed;
  36 
  37 /**
  38  * Native implementation of XRBackend.
  39  * Almost direct 1:1 binding to libX11.
  40  *
  41  * @author Clemens Eisserer
  42  */
  43 
  44 public class XRBackendNative implements XRBackend {
  45 
  46     static {
  47         initIDs();
  48     }
  49 
  50     private static long FMTPTR_A8;
  51     private static long FMTPTR_ARGB32;
  52     private static long MASK_XIMG;


 298                       XDoubleToFixed(maskTrx.getScaleX()),
 299                       XDoubleToFixed(maskTrx.getShearX()),
 300                       XDoubleToFixed(maskTrx.getTranslateX()),
 301                       XDoubleToFixed(maskTrx.getShearY()),
 302                       XDoubleToFixed(maskTrx.getScaleY()),
 303                       XDoubleToFixed(maskTrx.getTranslateY()),
 304                       maskWidth, maskHeight, lastMaskWidth, lastMaskHeight,
 305                       sx, sy, dx, dy, w, h);
 306     }
 307 
 308     private static native void padBlitNative(byte op, int srcPict,
 309                                              int maskPict, int dstPict,
 310                                              int m00, int m01, int m02,
 311                                              int m10, int m11, int m12,
 312                                              int maskWidth, int maskHeight,
 313                                              int lastMaskWidth,
 314                                              int lastMaskHeight,
 315                                              int sx, int sy, int dx, int dy,
 316                                              int w, int h);
 317 
 318     public void renderCompositeTrapezoids(byte op, int src, int maskFormat,
 319                                           int dst, int srcX, int srcY,
 320                                           TrapezoidList trapList) {
 321         renderCompositeTrapezoidsNative(op, src, getFormatPtr(maskFormat),
 322                                         dst, srcX, srcY,
 323                                         trapList.getTrapArray());
 324     }
 325 
 326     private static native void
 327         renderCompositeTrapezoidsNative(byte op, int src, long maskFormat,
 328                                         int dst, int srcX, int srcY,
 329                                         int[] trapezoids);
 330 }


  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package sun.java2d.xr;
  27 
  28 import java.awt.geom.*;
  29 import java.util.*;
  30 
  31 import sun.font.*;

  32 import sun.java2d.pipe.*;
  33 
  34 import static sun.java2d.xr.XRUtils.XDoubleToFixed;
  35 
  36 /**
  37  * Native implementation of XRBackend.
  38  * Almost direct 1:1 binding to libX11.
  39  *
  40  * @author Clemens Eisserer
  41  */
  42 
  43 public class XRBackendNative implements XRBackend {
  44 
  45     static {
  46         initIDs();
  47     }
  48 
  49     private static long FMTPTR_A8;
  50     private static long FMTPTR_ARGB32;
  51     private static long MASK_XIMG;


 297                       XDoubleToFixed(maskTrx.getScaleX()),
 298                       XDoubleToFixed(maskTrx.getShearX()),
 299                       XDoubleToFixed(maskTrx.getTranslateX()),
 300                       XDoubleToFixed(maskTrx.getShearY()),
 301                       XDoubleToFixed(maskTrx.getScaleY()),
 302                       XDoubleToFixed(maskTrx.getTranslateY()),
 303                       maskWidth, maskHeight, lastMaskWidth, lastMaskHeight,
 304                       sx, sy, dx, dy, w, h);
 305     }
 306 
 307     private static native void padBlitNative(byte op, int srcPict,
 308                                              int maskPict, int dstPict,
 309                                              int m00, int m01, int m02,
 310                                              int m10, int m11, int m12,
 311                                              int maskWidth, int maskHeight,
 312                                              int lastMaskWidth,
 313                                              int lastMaskHeight,
 314                                              int sx, int sy, int dx, int dy,
 315                                              int w, int h);
 316 












 317 }
< prev index next >