225 return SrcAtop;
226 case AlphaComposite.DST_ATOP:
227 return DstAtop;
228 case AlphaComposite.XOR:
229 return AlphaXor;
230 default:
231 throw new InternalError("Unrecognized alpha rule");
232 }
233 }
234
235 private int uniqueID;
236 private String desc;
237 private CompositeType next;
238
239 private CompositeType(CompositeType parent, String desc) {
240 next = parent;
241 this.desc = desc;
242 this.uniqueID = makeUniqueID(desc);
243 }
244
245 public synchronized static int makeUniqueID(String desc) {
246 Integer i = compositeUIDMap.get(desc);
247
248 if (i == null) {
249 if (unusedUID > 255) {
250 throw new InternalError("composite type id overflow");
251 }
252 i = unusedUID++;
253 compositeUIDMap.put(desc, i);
254 }
255 return i;
256 }
257
258 public int getUniqueID() {
259 return uniqueID;
260 }
261
262 public String getDescriptor() {
263 return desc;
264 }
265
|
225 return SrcAtop;
226 case AlphaComposite.DST_ATOP:
227 return DstAtop;
228 case AlphaComposite.XOR:
229 return AlphaXor;
230 default:
231 throw new InternalError("Unrecognized alpha rule");
232 }
233 }
234
235 private int uniqueID;
236 private String desc;
237 private CompositeType next;
238
239 private CompositeType(CompositeType parent, String desc) {
240 next = parent;
241 this.desc = desc;
242 this.uniqueID = makeUniqueID(desc);
243 }
244
245 public static synchronized int makeUniqueID(String desc) {
246 Integer i = compositeUIDMap.get(desc);
247
248 if (i == null) {
249 if (unusedUID > 255) {
250 throw new InternalError("composite type id overflow");
251 }
252 i = unusedUID++;
253 compositeUIDMap.put(desc, i);
254 }
255 return i;
256 }
257
258 public int getUniqueID() {
259 return uniqueID;
260 }
261
262 public String getDescriptor() {
263 return desc;
264 }
265
|