equal
deleted
inserted
replaced
96 * Ensure that noone can instantiate this class. |
96 * Ensure that noone can instantiate this class. |
97 */ |
97 */ |
98 private GraphicsPrimitiveMgr() { |
98 private GraphicsPrimitiveMgr() { |
99 } |
99 } |
100 |
100 |
101 public synchronized static void register(GraphicsPrimitive[] newPrimitives) |
101 public static synchronized void register(GraphicsPrimitive[] newPrimitives) |
102 { |
102 { |
103 GraphicsPrimitive[] devCollection = primitives; |
103 GraphicsPrimitive[] devCollection = primitives; |
104 int oldSize = 0; |
104 int oldSize = 0; |
105 int newSize = newPrimitives.length; |
105 int newSize = newPrimitives.length; |
106 if (debugTrace) { |
106 if (debugTrace) { |
119 System.arraycopy(newPrimitives, 0, temp, oldSize, newSize); |
119 System.arraycopy(newPrimitives, 0, temp, oldSize, newSize); |
120 needssort = true; |
120 needssort = true; |
121 primitives = temp; |
121 primitives = temp; |
122 } |
122 } |
123 |
123 |
124 public synchronized static void registerGeneral(GraphicsPrimitive gen) { |
124 public static synchronized void registerGeneral(GraphicsPrimitive gen) { |
125 if (generalPrimitives == null) { |
125 if (generalPrimitives == null) { |
126 generalPrimitives = new GraphicsPrimitive[] {gen}; |
126 generalPrimitives = new GraphicsPrimitive[] {gen}; |
127 return; |
127 return; |
128 } |
128 } |
129 int len = generalPrimitives.length; |
129 int len = generalPrimitives.length; |
131 System.arraycopy(generalPrimitives, 0, newGen, 0, len); |
131 System.arraycopy(generalPrimitives, 0, newGen, 0, len); |
132 newGen[len] = gen; |
132 newGen[len] = gen; |
133 generalPrimitives = newGen; |
133 generalPrimitives = newGen; |
134 } |
134 } |
135 |
135 |
136 public synchronized static GraphicsPrimitive locate(int primTypeID, |
136 public static synchronized GraphicsPrimitive locate(int primTypeID, |
137 SurfaceType dsttype) |
137 SurfaceType dsttype) |
138 { |
138 { |
139 return locate(primTypeID, |
139 return locate(primTypeID, |
140 SurfaceType.OpaqueColor, |
140 SurfaceType.OpaqueColor, |
141 CompositeType.Src, |
141 CompositeType.Src, |
142 dsttype); |
142 dsttype); |
143 } |
143 } |
144 |
144 |
145 public synchronized static GraphicsPrimitive locate(int primTypeID, |
145 public static synchronized GraphicsPrimitive locate(int primTypeID, |
146 SurfaceType srctype, |
146 SurfaceType srctype, |
147 CompositeType comptype, |
147 CompositeType comptype, |
148 SurfaceType dsttype) |
148 SurfaceType dsttype) |
149 { |
149 { |
150 /* |
150 /* |
168 } |
168 } |
169 } |
169 } |
170 return prim; |
170 return prim; |
171 } |
171 } |
172 |
172 |
173 public synchronized static GraphicsPrimitive |
173 public static synchronized GraphicsPrimitive |
174 locatePrim(int primTypeID, |
174 locatePrim(int primTypeID, |
175 SurfaceType srctype, |
175 SurfaceType srctype, |
176 CompositeType comptype, |
176 CompositeType comptype, |
177 SurfaceType dsttype) |
177 SurfaceType dsttype) |
178 { |
178 { |