Firefox Screenshot missing canvas content
Categories
(Core :: Graphics: Canvas2D, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox101 | --- | fixed |
People
(Reporter: aosmond, Assigned: aosmond)
Details
Attachments
(1 file, 1 obsolete file)
With a context owned by OffscreenCanvas
this works, but with a context owned directly by HTMLCanvasElement
, it does not. This is because nsDisplayCanvas::Paint
relies upon GetAsImage
:
which for Canvas 2D, WebGL and WebGPU use the default implementation:
which always returns null. We should return the front buffer contents.
Assignee | ||
Comment 1•2 years ago
|
||
This patch adds support for including the canvas contents in Firefox
Screenshots for Canvas 2D, WebGL and WebGPU. It is already working for
context's created through an OffscreenCanvas, but we failed to hook up
the main thread path after refactoring in previous bugs.
Comment 3•2 years ago
|
||
Backed out 3 changesets (bug 1765816, bug 1755704) for causing bp hybrid bustages.
Backout link: https://hg.mozilla.org/integration/autoland/rev/776755d387df2774cc1c8db65aa95f062a9cf306
Push with failureshttps://treeherder.mozilla.org/jobs?repo=autoland&selectedTaskRun=HOr18bURRv2Xs9uXDwDkJg.0&resultStatus=success%2Ctestfailed%2Cbusted%2Cexception%2Crunning%2Cpending%2Crunnable&searchStr=linux%2Cx64%2Cplain%2Cbuild-linux64-hybrid%2Fplain%2Cbp-hybrid&revision=505897037dafd4de9cf43800925150bcd3be0c16
Comment 5•2 years ago
|
||
bugherder |
Comment 6•2 years ago
|
||
Backed out along with Bug 1755704 for causing reftest failures on webgl-color-test.html
- backout: https://hg.mozilla.org/integration/autoland/rev/9d02f891a5a08942c8093b29dc88c1324f290c41
- push: https://treeherder.mozilla.org/jobs?repo=autoland&group_state=expanded&selectedTaskRun=Q5dWqz6fQRa79a_7_inJVg.0&revision=2f074e2385d41edf7a61fe2cb7b1d7cfc52f6cd0
- failure log: https://treeherder.mozilla.org/logviewer?job_id=375577053&repo=autoland&lineNumber=5863
[task 2022-04-23T23:09:30.555Z] 23:09:30 INFO - REFTEST TEST-START | dom/canvas/test/reftest/webgl-color-test.html?frame=1&__&________&_______&_____ == dom/canvas/test/reftest/wrapper.html?colors-no-alpha.png
[task 2022-04-23T23:09:30.559Z] 23:09:30 INFO - REFTEST INFO | RESTORE PREFERENCE pref(webgl.force-enabled,false)
[task 2022-04-23T23:09:30.559Z] 23:09:30 INFO - REFTEST INFO | SET PREFERENCE pref(webgl.force-enabled,true)
[task 2022-04-23T23:09:30.559Z] 23:09:30 INFO - REFTEST TEST-LOAD | file:///builds/worker/workspace/build/tests/reftest/tests/dom/canvas/test/reftest/webgl-color-test.html?frame=1&__&________&_______&_____ | 9 / 173 (5%)
[task 2022-04-23T23:09:30.608Z] 23:09:30 INFO - [Parent 2087, Compositor] WARNING: robust_buffer_access_behavior marked as unsupported: file /builds/worker/checkouts/gecko/gfx/gl/GLContextFeatures.cpp:632
[task 2022-04-23T23:09:30.609Z] 23:09:30 INFO - [Parent 2087, Compositor] WARNING: Robustness supported, strategy is not LOSE_CONTEXT_ON_RESET!: file /builds/worker/checkouts/gecko/gfx/gl/GLContext.cpp:999
[task 2022-04-23T23:09:30.609Z] 23:09:30 INFO - [Parent 2087, Compositor] WARNING: robustness marked as unsupported: file /builds/worker/checkouts/gecko/gfx/gl/GLContextFeatures.cpp:632
[task 2022-04-23T23:09:30.653Z] 23:09:30 INFO - [Parent 2087, Compositor] WARNING: Failed to make an ideal SurfaceFactory.: file /builds/worker/checkouts/gecko/dom/canvas/WebGLContext.cpp:955
[task 2022-04-23T23:09:30.717Z] 23:09:30 INFO - REFTEST INFO | RESTORE PREFERENCE pref(webgl.force-enabled,false)
[task 2022-04-23T23:09:30.720Z] 23:09:30 INFO - REFTEST INFO | SET PREFERENCE pref(webgl.force-enabled,true)
[task 2022-04-23T23:09:30.721Z] 23:09:30 INFO - REFTEST TEST-LOAD | file:///builds/worker/workspace/build/tests/reftest/tests/dom/canvas/test/reftest/wrapper.html?colors-no-alpha.png | 9 / 173 (5%)
[task 2022-04-23T23:09:31.130Z] 23:09:31 INFO - REFTEST TEST-UNEXPECTED-FAIL | dom/canvas/test/reftest/webgl-color-test.html?frame=1&__&________&_______&_____ == dom/canvas/test/reftest/wrapper.html?colors-no-alpha.png | image comparison, max difference: 127, number of differing pixels: 40000
Updated•2 years ago
|
Comment 7•2 years ago
|
||
Backout merged to central: https://hg.mozilla.org/mozilla-central/rev/9d02f891a5a0
Assignee | ||
Comment 8•2 years ago
|
||
Updated•2 years ago
|
Assignee | ||
Comment 9•2 years ago
|
||
I will just target this with WebGPU. While I did test before and after and I didn't get the contents for a WebGL demo I tried, clearly there is code working already for it and my change made things worse (the yflip didn't happen for WebGL -- canvas 2D would have been fine).
Comment 10•2 years ago
|
||
Comment 11•2 years ago
|
||
bugherder |
Description
•