diff --git a/js/FileManager.js b/js/FileManager.js index 56e507c..da47494 100644 --- a/js/FileManager.js +++ b/js/FileManager.js @@ -73,6 +73,9 @@ const FileManager = (() => { let emptyCanvas = document.createElement("canvas"); let layersCopy = currFile.layers.slice(); + exportCanvas.getContext("2d").willReadFrequently = true; + emptyCanvas.getContext("2d").willReadFrequently = true; + exportCanvas.width = currFile.canvasSize[0]; exportCanvas.height = currFile.canvasSize[1]; diff --git a/js/LayerList.js b/js/LayerList.js index dfa6999..5ef2ff8 100644 --- a/js/LayerList.js +++ b/js/LayerList.js @@ -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);