jdk/src/share/classes/sun/java2d/pipe/BufferedOpCodes.java
changeset 16734 da1901d79073
parent 12813 c10ab96dcf41
equal deleted inserted replaced
16733:9267ec7004a1 16734:da1901d79073
     1 /*
     1 /*
     2  * Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2005, 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
    23  * questions.
    23  * questions.
    24  */
    24  */
    25 
    25 
    26 package sun.java2d.pipe;
    26 package sun.java2d.pipe;
    27 
    27 
    28 import javax.tools.annotation.GenerateNativeHeader;
    28 import java.lang.annotation.Native;
    29 
    29 
    30 /* No native methods here, but the constants are needed in the supporting JNI code */
       
    31 @GenerateNativeHeader
       
    32 public class BufferedOpCodes {
    30 public class BufferedOpCodes {
    33     // draw ops
    31     // draw ops
    34     public static final int DRAW_LINE            = 10;
    32     @Native public static final int DRAW_LINE            = 10;
    35     public static final int DRAW_RECT            = 11;
    33     @Native public static final int DRAW_RECT            = 11;
    36     public static final int DRAW_POLY            = 12;
    34     @Native public static final int DRAW_POLY            = 12;
    37     public static final int DRAW_PIXEL           = 13;
    35     @Native public static final int DRAW_PIXEL           = 13;
    38     public static final int DRAW_SCANLINES       = 14;
    36     @Native public static final int DRAW_SCANLINES       = 14;
    39     public static final int DRAW_PARALLELOGRAM   = 15;
    37     @Native public static final int DRAW_PARALLELOGRAM   = 15;
    40     public static final int DRAW_AAPARALLELOGRAM = 16;
    38     @Native public static final int DRAW_AAPARALLELOGRAM = 16;
    41 
    39 
    42     // fill ops
    40     // fill ops
    43     public static final int FILL_RECT            = 20;
    41     @Native public static final int FILL_RECT            = 20;
    44     public static final int FILL_SPANS           = 21;
    42     @Native public static final int FILL_SPANS           = 21;
    45     public static final int FILL_PARALLELOGRAM   = 22;
    43     @Native public static final int FILL_PARALLELOGRAM   = 22;
    46     public static final int FILL_AAPARALLELOGRAM = 23;
    44     @Native public static final int FILL_AAPARALLELOGRAM = 23;
    47 
    45 
    48     // copy-related ops
    46     // copy-related ops
    49     public static final int COPY_AREA            = 30;
    47     @Native public static final int COPY_AREA            = 30;
    50     public static final int BLIT                 = 31;
    48     @Native public static final int BLIT                 = 31;
    51     public static final int MASK_FILL            = 32;
    49     @Native public static final int MASK_FILL            = 32;
    52     public static final int MASK_BLIT            = 33;
    50     @Native public static final int MASK_BLIT            = 33;
    53     public static final int SURFACE_TO_SW_BLIT   = 34;
    51     @Native public static final int SURFACE_TO_SW_BLIT   = 34;
    54 
    52 
    55     // text-related ops
    53     // text-related ops
    56     public static final int DRAW_GLYPH_LIST      = 40;
    54     @Native public static final int DRAW_GLYPH_LIST      = 40;
    57 
    55 
    58     // state-related ops
    56     // state-related ops
    59     public static final int SET_RECT_CLIP        = 51;
    57     @Native public static final int SET_RECT_CLIP        = 51;
    60     public static final int BEGIN_SHAPE_CLIP     = 52;
    58     @Native public static final int BEGIN_SHAPE_CLIP     = 52;
    61     public static final int SET_SHAPE_CLIP_SPANS = 53;
    59     @Native public static final int SET_SHAPE_CLIP_SPANS = 53;
    62     public static final int END_SHAPE_CLIP       = 54;
    60     @Native public static final int END_SHAPE_CLIP       = 54;
    63     public static final int RESET_CLIP           = 55;
    61     @Native public static final int RESET_CLIP           = 55;
    64     public static final int SET_ALPHA_COMPOSITE  = 56;
    62     @Native public static final int SET_ALPHA_COMPOSITE  = 56;
    65     public static final int SET_XOR_COMPOSITE    = 57;
    63     @Native public static final int SET_XOR_COMPOSITE    = 57;
    66     public static final int RESET_COMPOSITE      = 58;
    64     @Native public static final int RESET_COMPOSITE      = 58;
    67     public static final int SET_TRANSFORM        = 59;
    65     @Native public static final int SET_TRANSFORM        = 59;
    68     public static final int RESET_TRANSFORM      = 60;
    66     @Native public static final int RESET_TRANSFORM      = 60;
    69 
    67 
    70     // context-related ops
    68     // context-related ops
    71     public static final int SET_SURFACES         = 70;
    69     @Native public static final int SET_SURFACES         = 70;
    72     public static final int SET_SCRATCH_SURFACE  = 71;
    70     @Native public static final int SET_SCRATCH_SURFACE  = 71;
    73     public static final int FLUSH_SURFACE        = 72;
    71     @Native public static final int FLUSH_SURFACE        = 72;
    74     public static final int DISPOSE_SURFACE      = 73;
    72     @Native public static final int DISPOSE_SURFACE      = 73;
    75     public static final int DISPOSE_CONFIG       = 74;
    73     @Native public static final int DISPOSE_CONFIG       = 74;
    76     public static final int INVALIDATE_CONTEXT   = 75;
    74     @Native public static final int INVALIDATE_CONTEXT   = 75;
    77     public static final int SYNC                 = 76;
    75     @Native public static final int SYNC                 = 76;
    78     public static final int RESTORE_DEVICES      = 77;
    76     @Native public static final int RESTORE_DEVICES      = 77;
    79     public static final int SAVE_STATE           = 78;
    77     @Native public static final int SAVE_STATE           = 78;
    80     public static final int RESTORE_STATE        = 79;
    78     @Native public static final int RESTORE_STATE        = 79;
    81 
    79 
    82     // multibuffering ops
    80     // multibuffering ops
    83     public static final int SWAP_BUFFERS         = 80;
    81     @Native public static final int SWAP_BUFFERS         = 80;
    84 
    82 
    85     // special no-op op code (mainly used for achieving 8-byte alignment)
    83     // special no-op op code (mainly used for achieving 8-byte alignment)
    86     public static final int NOOP                 = 90;
    84     @Native public static final int NOOP                 = 90;
    87 
    85 
    88     // paint-related ops
    86     // paint-related ops
    89     public static final int RESET_PAINT               = 100;
    87     @Native public static final int RESET_PAINT               = 100;
    90     public static final int SET_COLOR                 = 101;
    88     @Native public static final int SET_COLOR                 = 101;
    91     public static final int SET_GRADIENT_PAINT        = 102;
    89     @Native public static final int SET_GRADIENT_PAINT        = 102;
    92     public static final int SET_LINEAR_GRADIENT_PAINT = 103;
    90     @Native public static final int SET_LINEAR_GRADIENT_PAINT = 103;
    93     public static final int SET_RADIAL_GRADIENT_PAINT = 104;
    91     @Native public static final int SET_RADIAL_GRADIENT_PAINT = 104;
    94     public static final int SET_TEXTURE_PAINT         = 105;
    92     @Native public static final int SET_TEXTURE_PAINT         = 105;
    95 
    93 
    96     // BufferedImageOp-related ops
    94     // BufferedImageOp-related ops
    97     public static final int ENABLE_CONVOLVE_OP     = 120;
    95     @Native public static final int ENABLE_CONVOLVE_OP     = 120;
    98     public static final int DISABLE_CONVOLVE_OP    = 121;
    96     @Native public static final int DISABLE_CONVOLVE_OP    = 121;
    99     public static final int ENABLE_RESCALE_OP      = 122;
    97     @Native public static final int ENABLE_RESCALE_OP      = 122;
   100     public static final int DISABLE_RESCALE_OP     = 123;
    98     @Native public static final int DISABLE_RESCALE_OP     = 123;
   101     public static final int ENABLE_LOOKUP_OP       = 124;
    99     @Native public static final int ENABLE_LOOKUP_OP       = 124;
   102     public static final int DISABLE_LOOKUP_OP      = 125;
   100     @Native public static final int DISABLE_LOOKUP_OP      = 125;
   103 }
   101 }