Closed Bug 1793769 Opened 2 years ago Closed 2 years ago

Continual mozilla::gfx::DrawTargetWebgl::SharedContext::CreateShaders

Categories

(Core :: Graphics: Canvas2D, defect)

defect

Tracking

()

RESOLVED FIXED
107 Branch
Tracking Status
firefox107 --- fixed

People

(Reporter: jrmuizel, Assigned: lsalzman)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Flags: needinfo?(lsalzman)

Note: this was with gfx.canvas.accelerated.profile-frames=0

Flags: needinfo?(lsalzman)

If we fail to compile DrawTargetWebgl's shaders, we bail out to a normal software canvas.
However, it will still try to create a DrawTargetWebgl every time we need to create a canvas.
To avoid this, remember if shader compilation failed in the process, and don't try to create
an accelerated canvas again in that case.

Assignee: nobody → lsalzman
Status: NEW → ASSIGNED

For canvas users that rapidly create and destroy canvases, we may end up creating
a new SharedContext (and hence ClientWebGLContext) if there are no more canvases
left between destruction and creation. To work around this, just keep alive the
SharedContext for the main thread (other threads are unfortunately a bit tricky
to support) so that canvas creation remains fast in this instance.

Depends on D158903

Attachment #9297719 - Attachment description: Bug 1793769 - Avoid trying to create DrawTargetWebgl if shared compilation failed. r?aosmond → Bug 1793769 - Avoid trying to create DrawTargetWebgl if shader compilation failed. r?aosmond
Pushed by lsalzman@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/0737cb829b7e Avoid trying to create DrawTargetWebgl if shader compilation failed. r=aosmond https://hg.mozilla.org/integration/autoland/rev/6387a6e7bbd5 Avoid recreating the main DrawTargetWebgl SharedContext. r=aosmond

Backed out for causing mochitest failures in @ std::_Hashtable<unsigned int, std::pair<unsigned int const, RefPtr<mozilla::WebGLTextureJS>

Backout link: https://hg.mozilla.org/integration/autoland/rev/0db234071bf67f735564bbd0c2a37edaf84fb909

Push with failures

Failure log

Flags: needinfo?(lsalzman)
Flags: needinfo?(lsalzman)
Pushed by lsalzman@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/01a92b6503fe Avoid trying to create DrawTargetWebgl if shader compilation failed. r=aosmond https://hg.mozilla.org/integration/autoland/rev/f824c70961a7 Avoid recreating the main DrawTargetWebgl SharedContext. r=aosmond
Flags: needinfo?(lsalzman)
Flags: needinfo?(lsalzman)
Pushed by lsalzman@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9ee98b3301d0 Avoid trying to create DrawTargetWebgl if shader compilation failed. r=aosmond https://hg.mozilla.org/integration/autoland/rev/5bc65958fa5c Avoid recreating the main DrawTargetWebgl SharedContext. r=aosmond

Hello, this remote failure appeared on the full push as well a bit towards the end of the running tests, could you take a look at it as well? Thank you! Failure log here.

Flags: needinfo?(lsalzman)
Flags: needinfo?(lsalzman)
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 107 Branch
Blocks: 1774972

Adding blocking to bug 1741501 as this bug improves the use of gpu-canvas (bug 1774972)

Blocks: gpu-canvas
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: