@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.
@@ -32054,9 +32054,12 @@ var BitmapSkin = /*#__PURE__*/function (_Skin) {
32054
32054
  // memory.
32055
32055
  var textureData = bitmapData;
32056
32056
  if (bitmapData instanceof HTMLCanvasElement) {
32057
- // Given a HTMLCanvasElement get the image data to pass to webgl and
32058
- // Silhouette.
32059
- var context = bitmapData.getContext('2d');
32057
+ // Given a HTMLCanvasElement, get the image data to pass to WebGL and the Silhouette. The 2D context was
32058
+ // likely already created, so `willReadFrequently` is likely ignored here, but it's good documentation and
32059
+ // may help if the code path changes someday.
32060
+ var context = bitmapData.getContext('2d', {
32061
+ willReadFrequently: true
32062
+ });
32060
32063
  textureData = context.getImageData(0, 0, bitmapData.width, bitmapData.height);
32061
32064
  }
32062
32065
  if (this._texture === null) {