From 7abbcdbb108be9f3f2e513608f874ebd83fe877d Mon Sep 17 00:00:00 2001 From: Thomas Weber Date: Sun, 16 Jan 2022 14:36:39 -0600 Subject: [PATCH] Don't use createImageBitmap to load bitmap costumes createImageBitmap uses a *lot* of memory. Image elements are much more efficient. Related to https://github.com/TurboWarp/desktop/issues/289 --- src/import/load-costume.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/import/load-costume.js b/src/import/load-costume.js index 9593cffe..e79c792c 100644 --- a/src/import/load-costume.js +++ b/src/import/load-costume.js @@ -111,12 +111,6 @@ const fetchBitmapCanvas_ = function (costume, runtime, rotationCenter) { return null; } - if (typeof createImageBitmap !== 'undefined') { - return createImageBitmap( - new Blob([asset.data], {type: asset.assetType.contentType}) - ); - } - return new Promise((resolve, reject) => { const image = new Image(); image.onload = function () {