jdk/src/share/classes/sun/java2d/opengl/OGLBlitLoops.java
changeset 16734 da1901d79073
parent 14646 94eed98a7ecb
child 21278 ef8a3a2a72f2
equal deleted inserted replaced
16733:9267ec7004a1 16734:da1901d79073
     1 /*
     1 /*
     2  * Copyright (c) 2003, 2007, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
    43 import sun.java2d.loops.TransformBlit;
    43 import sun.java2d.loops.TransformBlit;
    44 import sun.java2d.pipe.Region;
    44 import sun.java2d.pipe.Region;
    45 import sun.java2d.pipe.RenderBuffer;
    45 import sun.java2d.pipe.RenderBuffer;
    46 import sun.java2d.pipe.RenderQueue;
    46 import sun.java2d.pipe.RenderQueue;
    47 import static sun.java2d.pipe.BufferedOpCodes.*;
    47 import static sun.java2d.pipe.BufferedOpCodes.*;
    48 import javax.tools.annotation.GenerateNativeHeader;
    48 import java.lang.annotation.Native;
    49 
    49 
    50 /* No native methods here, but the constants are needed in the supporting JNI code */
       
    51 @GenerateNativeHeader
       
    52 class OGLBlitLoops {
    50 class OGLBlitLoops {
    53 
    51 
    54     static void register() {
    52     static void register() {
    55         Blit blitIntArgbPreToSurface =
    53         Blit blitIntArgbPreToSurface =
    56             new OGLSwToSurfaceBlit(SurfaceType.IntArgbPre,
    54             new OGLSwToSurfaceBlit(SurfaceType.IntArgbPre,
   188     /**
   186     /**
   189      * The following offsets are used to pack the parameters in
   187      * The following offsets are used to pack the parameters in
   190      * createPackedParams().  (They are also used at the native level when
   188      * createPackedParams().  (They are also used at the native level when
   191      * unpacking the params.)
   189      * unpacking the params.)
   192      */
   190      */
   193     private static final int OFFSET_SRCTYPE = 16;
   191     @Native private static final int OFFSET_SRCTYPE = 16;
   194     private static final int OFFSET_HINT    =  8;
   192     @Native private static final int OFFSET_HINT    =  8;
   195     private static final int OFFSET_TEXTURE =  3;
   193     @Native private static final int OFFSET_TEXTURE =  3;
   196     private static final int OFFSET_RTT     =  2;
   194     @Native private static final int OFFSET_RTT     =  2;
   197     private static final int OFFSET_XFORM   =  1;
   195     @Native private static final int OFFSET_XFORM   =  1;
   198     private static final int OFFSET_ISOBLIT =  0;
   196     @Native private static final int OFFSET_ISOBLIT =  0;
   199 
   197 
   200     /**
   198     /**
   201      * Packs the given parameters into a single int value in order to save
   199      * Packs the given parameters into a single int value in order to save
   202      * space on the rendering queue.
   200      * space on the rendering queue.
   203      */
   201      */