I was wondering if WebGL is considered stable enough to be enabled by default. It makes some PDFs render much faster and it has been off by default for a while now, so we have had quite some time to test it.

If we decide to enable WebGL by default, we should not forget to update https://github.com/mozilla/pdf.js/blob/master/extensions/chromium/preferences_schema.json#L39 as well.

/cc @yurydelendik 
/cc @Snuffleupagus (because IIRC you were testing WebGL too)

if (!bbox || typeof Path2D === "undefined") {
    return;
  }
  const width = bbox[2] - bbox[0];
  const height = bbox[3] - bbox[1];
  const region = new Path2D();
  region.rect(bbox[0], bbox[1], width, height);
  ctx.clip(region);
}
ShadingIRs.RadialAxial = {
  fromIR: function RadialAxial_fromIR(raw) {
    const type = raw[1];
    const bbox = raw[2];
    const colorStops = raw[3];
    const p0 = raw[4];
    const p1 = raw[5];
    const r0 = raw[6];
    const r1 = raw[7];
    return {
      getPattern: function RadialAxial_getPattern(ctx) {
        applyBoundingBox(ctx, bbox);
        let grad;
        if (type === "axial") {
          grad = ctx.createLinearGradient(p0[0], p0[1], p1[0], p1[1]);
        } else if (type === "radial") {
          grad = ctx.createRadialGradient(p0[0], p0[1], r0, p1[0], p1[1], r1);
        }
        for (let i = 0, ii = colorStops.length; i < ii; ++i) {