Implement partial OffscreenCanvasRenderingContext2D for main and worker threads
Categories
(Core :: Graphics: Canvas2D, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox98 | --- | fixed |
People
(Reporter: aosmond, Assigned: aosmond, NeedInfo)
References
(Blocks 1 open bug, Regressed 1 open bug)
Details
Attachments
(4 files)
Many test cases and applications seem to assume both. This is worth providing even a partial implementation just to provide test coverage.
This bug tracks putting together an initial implementation with the caveat that text rendering may be missing or suboptimal given its complexity.
Assignee | ||
Comment 1•3 years ago
|
||
It appears for fonts, we need more than just OffscreenCanvasRenderingContext2D. FontFace, etc are expected to be usable on a worker thread.
Assignee | ||
Updated•3 years ago
|
Updated•3 years ago
|
Assignee | ||
Comment 3•3 years ago
|
||
This patch is a non-functional change which allows the shutdown observer
to be overridden (since workers have a different mechanism). It also
fixes a static counter to be atomic, and adds mOffscreenCanvas to the
cycle collection tracking.
Assignee | ||
Comment 4•3 years ago
|
||
This patch is a non-functional change. It overloads some WebIDL methods
of CanvasRenderingContext2D to account for the difference between the
main thread and worker prototypes.
Depends on D135352
Assignee | ||
Comment 5•3 years ago
|
||
This patch adds a partial OffscreenCanvasRenderingContext2D
implementation. It is missing anything text and UI related, including
CanvasFilters, CanvasUserInterface, CanvasText, CanvasTextDrawingStyles,
and CanvasHitRegions.
Depends on D135353
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Assignee | ||
Comment 6•3 years ago
|
||
Comment 8•3 years ago
|
||
Backed out for causing mochitest webgl failures on test_2_conformance2__offscreencanvas__offscreencanvas-sync.html.
Later, more failures appeared:
This linux build bustage
This wpt failures
and This Windows MinGW all build bustages
[task 2022-02-02T21:17:25.382Z] 21:17:25 INFO - TEST-START | dom/canvas/test/webgl-conf/generated/test_2_conformance2__offscreencanvas__offscreencanvas-sync.html
[task 2022-02-02T21:17:29.020Z] 21:17:29 INFO - GECKO(1326) | 2022-02-02 21:17:29.019 firefox[1326:15595] Persistent UI failed to open file file:///Users/cltbld/Library/Saved%20Application%20State/org.mozilla.nightly.savedState/window_1.data: No such file or directory (2)
[task 2022-02-02T21:22:45.630Z] 21:22:45 INFO - TEST-INFO | started process screencapture
[task 2022-02-02T21:22:45.749Z] 21:22:45 INFO - TEST-INFO | screencapture: exit 0
[task 2022-02-02T21:22:45.749Z] 21:22:45 INFO - Buffered messages logged at 21:17:25
[task 2022-02-02T21:22:45.750Z] 21:22:45 INFO - TEST-PASS | dom/canvas/test/webgl-conf/generated/test_2_conformance2__offscreencanvas__offscreencanvas-sync.html | A valid string reason is expected
[task 2022-02-02T21:22:45.750Z] 21:22:45 INFO - TEST-PASS | dom/canvas/test/webgl-conf/generated/test_2_conformance2__offscreencanvas__offscreencanvas-sync.html | Reason cannot be empty
[task 2022-02-02T21:22:45.750Z] 21:22:45 INFO - Buffered messages finished
[task 2022-02-02T21:22:45.751Z] 21:22:45 INFO - TEST-UNEXPECTED-FAIL | dom/canvas/test/webgl-conf/generated/test_2_conformance2__offscreencanvas__offscreencanvas-sync.html | Test timed out. -
[task 2022-02-02T21:22:46.633Z] 21:22:46 INFO - GECKO(1326) | MEMORY STAT | vsize 6608MB | residentFast 98MB | heapAllocated 11MB
[task 2022-02-02T21:22:46.638Z] 21:22:46 INFO - TEST-OK | dom/canvas/test/webgl-conf/generated/test_2_conformance2__offscreencanvas__offscreencanvas-sync.html | took 321256ms
[task 2022-02-02T21:22:46.647Z] 21:22:46 INFO - TEST-START | dom/canvas/test/webgl-conf/generated/test_2_conformance2__offscreencanvas__offscreencanvas-timer-query.html
Assignee | ||
Comment 9•3 years ago
|
||
Single failing test on OSX opt (not debug interestingly) due to timeout, nothing interesting in the log to help me debug this. I'll mark it as failing and reland.
Assignee | ||
Comment 10•3 years ago
|
||
try for a whole bunch of OSX variants: https://treeherder.mozilla.org/jobs?repo=try&revision=a84474bd12f98034a15d3c347ec980135c5ba7e3
Comment 11•3 years ago
|
||
Comment 12•3 years ago
|
||
Backed out as per Andrew's request.
Also please check again the comment no. 8 for more info about the previous backout.
Assignee | ||
Comment 13•3 years ago
|
||
This appears to be causing the TSAN issue, possibly the rooting hazard as well:
https://searchfox.org/mozilla-central/rev/90e5ec580b4334c54829d83d79222d0b3ca4c5df/dom/canvas/CanvasRenderingContext2D.cpp#877
Assignee | ||
Comment 14•3 years ago
|
||
Let's see if this covers everything:
https://treeherder.mozilla.org/jobs?repo=try&revision=f42f6b59b4100a4fdb21750577b89e875e5f1228
Comment 15•3 years ago
|
||
Comment 16•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/b43727bd95d6
https://hg.mozilla.org/mozilla-central/rev/3e808ae032db
https://hg.mozilla.org/mozilla-central/rev/9712b727646f
https://hg.mozilla.org/mozilla-central/rev/428fb86f9ff1
Comment 18•2 years ago
|
||
The docs for this can be tracked in https://github.com/mdn/content/issues/18772
Bug fix says "partial implementation". What is implemented in OffscreenCanvasRenderingContext2D
- is it exactly the same methods/properties as CanvasRenderingContext2D
?
Updated•2 years ago
|
Description
•