8259042: Inconsistent use of general primitives loops

Reviewed-by: prr
This commit is contained in:
Sergey Bylokhov 2021-01-06 10:07:03 +00:00
parent e3b9da1456
commit 8a05d60532
22 changed files with 93 additions and 227 deletions

View file

@ -121,6 +121,12 @@ public final class GraphicsPrimitiveMgr {
primitives = temp;
}
/**
* Registers the general loop which will be used to produce specific
* primitives by the {@link GraphicsPrimitive#makePrimitive} function.
*
* @param gen the graphics primitive to be registered as the general loop
*/
public static synchronized void registerGeneral(GraphicsPrimitive gen) {
if (generalPrimitives == null) {
generalPrimitives = new GraphicsPrimitive[] {gen};