Closed Bug 1781527 Opened 4 years ago Closed 3 years ago

Implement VideoFrame for CanvasImageSource and ImageBitmapSource

Categories

(Core :: Graphics: Canvas2D, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
117 Branch
Tracking Status
firefox117 --- fixed

People

(Reporter: chunmin, Assigned: aosmond)

References

(Blocks 1 open bug)

Details

Attachments

(3 external files, 1 obsolete file)

CanvasImageSource should be up to date [1, 2] once VideoFrame is implemented in bug 1774300. ImageBitmapSource needs to be updated as well since it inherits from CanvasImageSource [3].

[1] https://html.spec.whatwg.org/multipage/canvas.html#canvasimagesource
[2] https://github.com/w3c/webcodecs/issues/158
[3] https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#imagebitmapsource

Assignee: nobody → cchang
Status: NEW → ASSIGNED
Assignee: cchang → aosmond
Severity: -- → S3
Type: task → enhancement

This patch adds a new method to convert from a VideoFrame to a
SurfaceFromElementResult, which is used by canvas, WebGPU and
ImageBitmap to do necessary conversions to a native surface.

Attachment #9287157 - Attachment description: Bug 1781527 - Add VideoFrame into CanvasImageSource → Bug 1781527 - Part 2. Implement means to use VideoFrame with ImageBitmap and CanvasRenderingContext2D.

Comment on attachment 9339344 [details]
Bug 1781527 - Part 3. Implement means to use VideoFrame with WebGL.

Revision D181118 was moved to bug 1781526. Setting attachment 9339344 [details] to obsolete.

Attachment #9339344 - Attachment is obsolete: true
Pushed by aosmond@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f7a2f2b89ba8 Part 1. Add nsLayoutUtils::SurfaceFromVideoFrame. r=gfx-reviewers,chunmin,lsalzman https://hg.mozilla.org/integration/autoland/rev/34d140bc5b99 Part 2. Implement means to use VideoFrame with ImageBitmap and CanvasRenderingContext2D. r=chunmin,webidl,gfx-reviewers,smaug,lsalzman https://hg.mozilla.org/integration/autoland/rev/f6c56b5e6450 Part 3. Implement support for surfaces requiring scaling/crop rects with canvas. r=lsalzman https://hg.mozilla.org/integration/autoland/rev/d3ca9e70625b apply code formatting via Lando

Backed out for causing Assertion in ImageBitmap.cpp

Flags: needinfo?(aosmond)

Reviewing the code, it is actually a bad assertion, so I will remove it.

Flags: needinfo?(aosmond)
Pushed by aosmond@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/37f0ddb14261 Part 1. Add nsLayoutUtils::SurfaceFromVideoFrame. r=gfx-reviewers,chunmin,lsalzman https://hg.mozilla.org/integration/autoland/rev/1766046703c8 Part 2. Implement means to use VideoFrame with ImageBitmap and CanvasRenderingContext2D. r=chunmin,webidl,gfx-reviewers,smaug,lsalzman https://hg.mozilla.org/integration/autoland/rev/36c0839d5021 Part 3. Implement support for surfaces requiring scaling/crop rects with canvas. r=lsalzman https://hg.mozilla.org/integration/autoland/rev/4704cdd04b5e apply code formatting via Lando
Depends on: 1843516
No longer depends on: 1843516
Regressions: 1851943
Duplicate of this bug: 1849639
See Also: → 1903543
Blocks: VideoFrame
No longer depends on: VideoFrame
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: