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:
1 parent
be7cd303a5
commit
7abbcdbb10
1 file changed
-6
@@ -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 () {
|
||||
|
||||
Reference in new issue
Block a user