1 /*
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.
4  *
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
7  * published by the Free Software Foundation.  Oracle designates this
8  * particular file as subject to the "Classpath" exception as provided
9  * by Oracle in the LICENSE file that accompanied this code.
10  *
11  * This code is distributed in the hope that it will be useful, but WITHOUT
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.pipe;
27 
28 import java.lang.annotation.Native;
29 
30 public class BufferedOpCodes {
31     // draw ops
32     @Native public static final int DRAW_LINE            = 10;
33     @Native public static final int DRAW_RECT            = 11;
34     @Native public static final int DRAW_POLY            = 12;
35     @Native public static final int DRAW_PIXEL           = 13;
36     @Native public static final int DRAW_SCANLINES       = 14;
37     @Native public static final int DRAW_PARALLELOGRAM   = 15;
38     @Native public static final int DRAW_AAPARALLELOGRAM = 16;
39 
40     // fill ops
41     @Native public static final int FILL_RECT            = 20;
42     @Native public static final int FILL_SPANS           = 21;
43     @Native public static final int FILL_PARALLELOGRAM   = 22;
44     @Native public static final int FILL_AAPARALLELOGRAM = 23;
45 
46     // copy-related ops
47     @Native public static final int COPY_AREA            = 30;
48     @Native public static final int BLIT                 = 31;
49     @Native public static final int MASK_FILL            = 32;
50     @Native public static final int MASK_BLIT            = 33;
51     @Native public static final int SURFACE_TO_SW_BLIT   = 34;
52 
53     // text-related ops
54     @Native public static final int DRAW_GLYPH_LIST      = 40;
55 
56     // state-related ops
57     @Native public static final int SET_RECT_CLIP        = 51;
58     @Native public static final int BEGIN_SHAPE_CLIP     = 52;
59     @Native public static final int SET_SHAPE_CLIP_SPANS = 53;
60     @Native public static final int END_SHAPE_CLIP       = 54;
61     @Native public static final int RESET_CLIP           = 55;
62     @Native public static final int SET_ALPHA_COMPOSITE  = 56;
63     @Native public static final int SET_XOR_COMPOSITE    = 57;
64     @Native public static final int RESET_COMPOSITE      = 58;
65     @Native public static final int SET_TRANSFORM        = 59;
66     @Native public static final int RESET_TRANSFORM      = 60;
67 
68     // context-related ops
69     @Native public static final int SET_SURFACES         = 70;
70     @Native public static final int SET_SCRATCH_SURFACE  = 71;
71     @Native public static final int FLUSH_SURFACE        = 72;
72     @Native public static final int DISPOSE_SURFACE      = 73;
73     @Native public static final int DISPOSE_CONFIG       = 74;
74     @Native public static final int INVALIDATE_CONTEXT   = 75;
75     @Native public static final int SYNC                 = 76;
76     @Native public static final int RESTORE_DEVICES      = 77;
77     @Native public static final int SAVE_STATE           = 78;
78     @Native public static final int RESTORE_STATE        = 79;
79 
80     // multibuffering ops
81     @Native public static final int SWAP_BUFFERS         = 80;
82 
83     // special no-op op code (mainly used for achieving 8-byte alignment)
84     @Native public static final int NOOP                 = 90;
85 
86     // paint-related ops
87     @Native public static final int RESET_PAINT               = 100;
88     @Native public static final int SET_COLOR                 = 101;
89     @Native public static final int SET_GRADIENT_PAINT        = 102;
90     @Native public static final int SET_LINEAR_GRADIENT_PAINT = 103;
91     @Native public static final int SET_RADIAL_GRADIENT_PAINT = 104;
92     @Native public static final int SET_TEXTURE_PAINT         = 105;
93 
94     // BufferedImageOp-related ops
95     @Native public static final int ENABLE_CONVOLVE_OP     = 120;
96     @Native public static final int DISABLE_CONVOLVE_OP    = 121;
97     @Native public static final int ENABLE_RESCALE_OP      = 122;
98     @Native public static final int DISABLE_RESCALE_OP     = 123;
99     @Native public static final int ENABLE_LOOKUP_OP       = 124;
100     @Native public static final int DISABLE_LOOKUP_OP      = 125;
101 }
102