Skip to content

Commit

Permalink
revert to copyonwritearraylist
Browse files Browse the repository at this point in the history
  • Loading branch information
mikebarkmin committed Dec 30, 2024
1 parent 3501e9e commit 7cf7ea2
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/org/openpatch/scratch/Stage.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import java.time.Month;
import java.time.temporal.ChronoUnit;
import java.util.AbstractMap;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.Queue;
Expand Down Expand Up @@ -40,12 +39,12 @@
*/
public class Stage {

private final List<Image> backdrops = new ArrayList<>();
private final List<Image> backdrops = new CopyOnWriteArrayList<>();
private Color color = new Color();
private int currentBackdrop = 0;
private final List<Sound> sounds = new ArrayList<>();
private final List<Sound> sounds = new CopyOnWriteArrayList<>();
private int currentShader = 0;
private List<Shader> shaders = new ArrayList<>();
private List<Shader> shaders = new CopyOnWriteArrayList<>();

private PGraphics mainBuffer;

Expand Down Expand Up @@ -145,10 +144,10 @@ public Stage(boolean fullScreen, String assets) {
public Stage(int width, final int height, boolean fullScreen, String assets) {
this.cursor = null;
this.camera = new Camera();
this.texts = new ArrayList<>();
this.pens = new ArrayList<>();
this.sprites = new ArrayList<>();
this.shaders = new ArrayList<>();
this.texts = new CopyOnWriteArrayList<>();
this.pens = new CopyOnWriteArrayList<>();
this.sprites = new CopyOnWriteArrayList<>();
this.shaders = new CopyOnWriteArrayList<>();
this.backgroundStamps = new ConcurrentLinkedQueue<>();
this.foregroundStamps = new ConcurrentLinkedQueue<>();
this.uiStamps = new ConcurrentLinkedQueue<>();
Expand Down

0 comments on commit 7cf7ea2

Please sign in to comment.