Allow parallelisation of masks (#636)

* Allow parallelisation of masks
Increasing performance improvement with increased masking complexity and edit size.

* Address comments
 - Rename Mask#clone to Mask#copy
 - Rename Mask2D#copy to Mask2D#copy2D
 - Correct formatting

* cx -> centerX

* Make various operations relying on a single SingleThreadQueueExtent instance (mainly brushes) thread safe
This commit is contained in:
dordsor21
2020-09-25 15:00:42 +01:00
committed by GitHub
parent 3f1e8fa4d4
commit 855389c785
70 changed files with 893 additions and 266 deletions

View File

@ -17,7 +17,7 @@ public abstract class CharBlocks implements IBlocks {
};
public static final Section EMPTY = new Section() {
@Override
public final char[] get(CharBlocks blocks, int layer) {
public synchronized final char[] get(CharBlocks blocks, int layer) {
char[] arr = blocks.blocks[layer];
if (arr == null) {
arr = blocks.blocks[layer] = blocks.update(layer, null);