bp74 / StageXL

A fast and universal 2D rendering engine for HTML5 and Dart.
http://www.stagexl.org
Other
880 stars 82 forks source link

Use xhr to load images, use createImageBitmap and ImageBitmap #352

Closed mnordine closed 2 years ago

mnordine commented 2 years ago

This results in more efficient usage of bitmaps, by reducing image upload latency by saving a memory copy.

See https://developer.mozilla.org/en-US/docs/Web/API/ImageBitmap

Unfortunately, the Dart SDK still does not support this natively, so we have to resort to some js_util hacks to get around this.

Closes https://github.com/bp74/StageXL/issues/351