Closed Bug 1804746 Opened 3 years ago Closed 2 years ago

canvas.toBlob() does not work on transferred offscreen canvas

Categories

(Core :: Graphics: CanvasWebGL, defect)

Firefox 107
Desktop
macOS
defect

Tracking

()

VERIFIED FIXED
119 Branch
Tracking Status
firefox119 --- verified

People

(Reporter: ckusuma, Assigned: aosmond)

References

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36

Steps to reproduce:

  • Unzip manual-worker-capture-canvas.zip and start a server on the folder
  • Open "test.html"
  • Click on "Capture Canvas To Image" button

Actual results:

The image capture of the canvas when the button is pressed is blank.

Expected results:

A properly filled image capture of the canvas should be displayed below the canvas. The expected behavior works on Chrome (tested in 108.0.5359.94).

Auxillary bug: right when the test video loops, an exception is thrown from createImageBitmap() which is caught from the catch:

"DOMException: An attempt was made to use an object that is not, or is no longer, usable"

Chrome 108 also does not have this error thrown.

The Bugbug bot thinks this bug should belong to the 'Core::Graphics: Canvas2D' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Graphics: Canvas2D
Product: Firefox → Core
Component: Graphics: Canvas2D → Graphics: CanvasWebGL
OS: Unspecified → macOS
Hardware: Unspecified → Desktop

Friendly bump on this issue

Flags: needinfo?(jgilbert)
Severity: -- → S3
Flags: needinfo?(jgilbert)

@aosmond: Is this expected to be unimplemented?

Flags: needinfo?(aosmond)

Adjusting the test case to work with ToDataURL works with my patch in bug 1744854 (and in Chrome), so I just need to land that and do something similar for ToBlob.

Assignee: nobody → aosmond
Status: UNCONFIRMED → ASSIGNED
Depends on: 1744854
Ever confirmed: true
Flags: needinfo?(aosmond)
Pushed by aosmond@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5d1a79d9c33a Make HTMLCanvasElement's toBlob to work with OffscreenCanvas. r=gfx-reviewers,lsalzman
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 119 Branch
Flags: qe-verify+

Reproduced with Fx 109.0a1(2022-12-08) on macOS 13.
Verified fixed with FX 120.0a1(2023-10-01) and Fx 119.0b3 on macOS 13.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: