Closed Bug 1920580 Opened 2 years ago Closed 1 year ago

Add plumbing to allow compositor process to context reset individual canvases

Categories

(Core :: Graphics: Canvas2D, task)

task

Tracking

()

RESOLVED FIXED
133 Branch
Tracking Status
firefox133 --- fixed

People

(Reporter: aosmond, Assigned: aosmond)

Details

Attachments

(2 files)

We support context lost/restored for Canvas2D, but only for GPU process crashes. We should extend this to work for WebGL context resets with accelerated canvas. This will allow us to recover from a lost context in the case where we did not happen to have a snapshot saved already.

This patch adds the necessary plumbing for accelerated canvas to trigger
a context lost / context restored events on the Canvas2D DOM object.
Currently we support this when the GPU process is crashed and restored,
but accelerated canvas can lose its WebGL context in a similar manner.

Note that not all accelerated canvases are impacted. Only the ones
without a recent snapshot and/or already fallen back to Skia will
require a context lost / restored event.

When AC2D fails to fall back to a software canvas due to not having a cached
surface available, we need to notify the canvas with an event so that it can
respond appropriately. This uses the newly added plumbing to do route this.

Pushed by lsalzman@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5287a74aad56 Add plumbing to allow compositor process to context reset individual canvases. r=lsalzman https://hg.mozilla.org/integration/autoland/rev/2cb15593fa88 Detect WebGL context loss and notify Canvas2D of reset. r=aosmond
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 133 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: