@glimt/record 0.0.12 → 0.0.14

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.
package/dist/record.cjs CHANGED
@@ -364,13 +364,18 @@ function toLowerCase(str) {
364
364
  }
365
365
  const ORIGINAL_ATTRIBUTE_NAME = "__rrweb_original__";
366
366
  function is2DCanvasBlank(canvas) {
367
- const ctx = canvas.getContext("2d");
367
+ console.log("Creating context with willReadFrequently:", canvas);
368
+ const ctx = canvas.getContext("2d", {
369
+ willReadFrequently: true
370
+ });
368
371
  if (!ctx) return true;
369
372
  const chunkSize = 50;
370
373
  for (let x2 = 0; x2 < canvas.width; x2 += chunkSize) {
371
374
  for (let y = 0; y < canvas.height; y += chunkSize) {
372
375
  const getImageData = ctx.getImageData;
373
376
  const originalGetImageData = ORIGINAL_ATTRIBUTE_NAME in getImageData ? getImageData[ORIGINAL_ATTRIBUTE_NAME] : getImageData;
377
+ console.log("Calling getImageData on ctx:", ctx);
378
+ console.trace();
374
379
  const pixelBuffer = new Uint32Array(
375
380
  // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access
376
381
  originalGetImageData.call(