@scratch/scratch-render 12.1.2 → 12.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -190633,9 +190633,12 @@ var BitmapSkin = /*#__PURE__*/function (_Skin) {
190633
190633
  // memory.
190634
190634
  var textureData = bitmapData;
190635
190635
  if (bitmapData instanceof HTMLCanvasElement) {
190636
- // Given a HTMLCanvasElement get the image data to pass to webgl and
190637
- // Silhouette.
190638
- var context = bitmapData.getContext('2d');
190636
+ // Given a HTMLCanvasElement, get the image data to pass to WebGL and the Silhouette. The 2D context was
190637
+ // likely already created, so `willReadFrequently` is likely ignored here, but it's good documentation and
190638
+ // may help if the code path changes someday.
190639
+ var context = bitmapData.getContext('2d', {
190640
+ willReadFrequently: true
190641
+ });
190639
190642
  textureData = context.getImageData(0, 0, bitmapData.width, bitmapData.height);
190640
190643
  }
190641
190644
  if (this._texture === null) {