Added willReadFrequently attribute

This commit is contained in:
Nicola
2022-10-24 12:40:34 +02:00
parent dca2748a4e
commit 9e250c015e
2 changed files with 4 additions and 0 deletions

View File

@@ -63,6 +63,7 @@ const LayerList = (() => {
// Creating a layer object
let newLayer = new Layer(currFile.canvasSize[0], currFile.canvasSize[1], newCanvas, toAppend);
newLayer.context.fillStyle = currFile.currentLayer.context.fillStyle;
newLayer.context.willReadFrequently = true;
newLayer.copyData(currFile.currentLayer);
// currFile.layers.splice(index, 0, newLayer);