Add initial implementation of OffscreenCanvas + WebGL
Categories
(Core :: Graphics: CanvasWebGL, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox97 | --- | fixed |
People
(Reporter: aosmond, Assigned: aosmond)
References
Details
(Keywords: dev-doc-needed)
Crash Data
Attachments
(12 files, 1 obsolete file)
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review |
The OffscreenCanvas WebIDL has fallen behind the standard. We need to update it to be more current before we can hope to ship this feature.
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 1•4 years ago
|
||
This patch contains no functional changes but sets us up for refactoring
in a later part in this series. It also helps silence a bunch of
compiler warnings.
Assignee | ||
Comment 2•4 years ago
|
||
This patch contains no functional changes but sets us up for refactoring
in a later part in this series.
Assignee | ||
Comment 3•4 years ago
|
||
Assignee | ||
Comment 4•4 years ago
|
||
Assignee | ||
Comment 5•4 years ago
|
||
Assignee | ||
Comment 6•4 years ago
|
||
This patch separates out a class, nsICanvasRenderingDisplay, for use on
the display list building pipeline. nsICanvasRenderingContextInternal
inherits from this and all of the canvas contexts implement the APIs the
same as today for display purposes. This will make it easier to provide
a display only class for OffscreenCanvas.
It also standardizes on SupportsWeakPtr/WeakPtr instead of mixing in C++
standard library versions.
Assignee | ||
Comment 7•4 years ago
|
||
Workers require all runnables to implement nsIDiscardableRunnable. This
is because the worker may want to terminate after going out of scope,
and want to discard any pending events. It should be safe to simply drop
any WebGL related events since we are going to tear down the context /
actors as well.
Also ensure that we record dirty events even without an associated
HTMLCanvasElement so that the OffscreenCanvas is notified properly.
Assignee | ||
Comment 8•4 years ago
|
||
Assignee | ||
Comment 9•4 years ago
|
||
Right now, if we wanted to get a snapshot of an OffscreenCanvas context
on a worker thread from the main thread, we would need to block the main
thread on the worker thread, and from the worker thread, issue a sync
IPC call get the front buffer snapshot.
This patch adds an alternative which allows the main thread to go
directly to the canvas owning thread in the compositor process to get
the snapshot, thereby bypassing the worker thread in content process
entirely. All it needs as the unique ID of the CanvasManagerChild
instance, and the protocol ID of the WebGLChild instance.
This will be used for Firefox screenshots, New Tab tiles, and printing.
Assignee | ||
Comment 10•4 years ago
|
||
This helper class manages the necessary state to facilitate the display
pipeline for an OffscreenCanvas created through HTMLCanvasElement's
transferControlToOffscreen.
Assignee | ||
Comment 11•4 years ago
|
||
This patch integrates OffscreenCanvasDisplayHelper with
HTMLCanvasElement, OffscreenCanvas and nsDisplayCanvas to allow
asynchronous display of an OffscreenCanvas.
Assignee | ||
Comment 12•4 years ago
|
||
Assignee | ||
Comment 13•4 years ago
|
||
Assignee | ||
Updated•4 years ago
|
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Updated•4 years ago
|
Comment 17•4 years ago
|
||
Comment on attachment 9250061 [details]
Bug 1736177 - Part 12. Make HTMLCanvasElement's toDataURL to work with OffscreenCanvas.
Revision D130788 was moved to bug 1744854. Setting attachment 9250061 [details] to obsolete.
Comment 18•4 years ago
|
||
Comment 19•4 years ago
|
||
Backed out for bp-hybrid failures and others, along with Bug 1738971
-
backout: https://hg.mozilla.org/integration/autoland/rev/d38a89ced939d330f8f9cd88926297e7c158ce72
-
failure logs:
- chrome/common/ipc_message_utils.h:116:33: error: no member named 'Write' in 'IPC::ParamTraits<mozilla::gfx::IntRectTyped<mozilla::gfx::UnknownUnits>>'
- TEST-UNEXPECTED-FAIL | dom/media/webrtc/tests/mochitests/test_peerConnection_captureStream_canvas_webgl.html | Test timed out. -
- TEST-UNEXPECTED-FAIL | dom/serviceworkers/test/test_serviceworker_interfaces.html | undefined: If this is failing: DANGER, are you sure you want to expose the new interface WebGLQuery to all webpages as a property on self? Do not make a change to this file without a review from a DOM peer for that specific change!!! (or a JS peer for changes to ecmaGlobals)
Assignee | ||
Comment 20•4 years ago
|
||
I think I've gotten the outstanding issues resolved except for the WebRTC one which seems to be out of left field. But it is failing consistently and it is WebGL, so it is plausible I broke something.
Assignee | ||
Comment 22•4 years ago
|
||
It appears that it is part 7 that caused it. Perhaps it is related to the changes in ClientWebGLContext::MarkCanvasDirty
, as the behaviour is slightly different for setting mCapturedFrameInvalidated
to true
, and the test case is capture related.
Assignee | ||
Comment 23•4 years ago
|
||
Let's see if this does it:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=9934a5b81ab4e74f1de8047990b2d9be6f845ac2
Comment 25•4 years ago
|
||
Comment 26•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/5ad078db7d7b
https://hg.mozilla.org/mozilla-central/rev/6cbaee34e535
https://hg.mozilla.org/mozilla-central/rev/25ca519aa6fc
https://hg.mozilla.org/mozilla-central/rev/f5814b14480c
https://hg.mozilla.org/mozilla-central/rev/e8c475e9e8e4
https://hg.mozilla.org/mozilla-central/rev/26e52340910f
https://hg.mozilla.org/mozilla-central/rev/2859a91f3a73
https://hg.mozilla.org/mozilla-central/rev/047bcbf3769f
https://hg.mozilla.org/mozilla-central/rev/7e5591aad25a
https://hg.mozilla.org/mozilla-central/rev/7b946576bafa
https://hg.mozilla.org/mozilla-central/rev/bc1b6e82d67f
https://hg.mozilla.org/mozilla-central/rev/a441516deed7
Comment 27•4 years ago
|
||
Adding dev-doc-needed keyword so I can track this for MDN updates
Description
•