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
This commit is contained in:
Thomas Weber committed 2022-01-16 14:36:39 -06:00
1 parent be7cd303a5
commit 7abbcdbb10
1 file changed
-6
-6
View File
@@ -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 () {