Closed Bug 1912431 Opened 1 month ago Closed 1 month ago

Some Unicode pictograms are not shown if they were first drawn with globalAlpha=0

Categories

(Core :: Graphics: Canvas2D, defect)

Firefox 129
defect

Tracking

()

RESOLVED FIXED
131 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox-esr128 --- fixed
firefox129 --- wontfix
firefox130 --- fixed
firefox131 --- fixed

People

(Reporter: martynasma, Assigned: jfkthame)

References

(Regression)

Details

(Keywords: regression)

Attachments

(4 files)

Reproduce:

  1. Create a <canvas> element
  2. Set context.globalAlpha = 0.
  3. Draw text which includes Unicode pictograms, e.g. "🕛".
  4. Set context.globalAlpha = 1.
  5. Draw text which includes Unicode pictograms, e.g. "🕛".

Live demo:
https://codepen.io/team/amcharts/pen/ExBvOod/782ea4f2c0233491a115df464405c164?editors=0010

Actual outcome:

  • The first text is all invisible (correct).
  • Only regular characters are visible in the second text, Unicode pictograms (e.g. 🕛) are still invisible, even though they take up space. (bug)

Desired outcome:

  • All text, including Unicode pictograms should have been visible.

The Bugbug bot thinks this bug should belong to the 'Core::Graphics: Canvas2D' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: General → Graphics: Canvas2D
Product: Firefox → Core

Can confirm.
Bisection:

Bug 1875670 - Add a cache for rasterized COLRv1 glyphs, because fully redrawing them on each use can be expensive. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D200139

Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: regression
Regressed by: 1875670
Flags: needinfo?(jfkthame)

Set release status flags based on info from the regressing bug 1875670

See Also: → 1908261

The reftest here currently fails on Android for what appears to be an
unrelated reason: reftest-analyzer shows that in the reference case,
all but the last line of text is completely missing.

I'm not sure what's failing there (but it fails similarly without this
patch, anyhow); we should investigate that as a separate bug.

Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Pushed by jkew@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b1612e480369
Don't apply global alpha when creating a cached color glyph. r=gfx-reviewers,lsalzman

Backed out for causing reftest failures on 1912431-emoji-globalAlpha.html

Backout link

Push with failures

Failure log

Pushed by jkew@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6615415921d9
Don't apply global alpha when creating a cached color glyph. r=gfx-reviewers,lsalzman
Flags: needinfo?(jfkthame)
See Also: → 1912718
Flags: needinfo?(jfkthame)
Pushed by jkew@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/05e409210f6b
Don't apply global alpha when creating a cached color glyph. r=gfx-reviewers,lsalzman

Sigh.... so many different backends, with subtly different rendering... :(. Tweaked the fuzz numbers again.

Flags: needinfo?(jfkthame)
Pushed by jkew@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f189c9ba3746
Don't apply global alpha when creating a cached color glyph. r=gfx-reviewers,lsalzman

Backed out for causing reftest failures in 1912431-emoji-globalAlpha.html

  • Backout link
  • Push with failures
  • Failure Log
  • Failure line: REFTEST TEST-UNEXPECTED-PASS | gfx/tests/reftest/1912431-emoji-globalAlpha.html == gfx/tests/reftest/1912431-emoji-globalAlpha-ref.html | image comparison, max difference: 0, number of differing pixels: 0
Flags: needinfo?(jfkthame)

Huh, so the Android failure (bug 1912718) doesn't always happen.

Flags: needinfo?(jfkthame)
Pushed by jkew@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a39f4090a526
Don't apply global alpha when creating a cached color glyph. r=gfx-reviewers,lsalzman
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 131 Branch

The patch landed in nightly and beta is affected.
:jfkthame, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox130 to wontfix.

For more information, please visit BugBot documentation.

Flags: needinfo?(jfkthame)

The reftest here currently fails on Android for what appears to be an
unrelated reason: reftest-analyzer shows that in the reference case,
all but the last line of text is completely missing.

I'm not sure what's failing there (but it fails similarly without this
patch, anyhow); we should investigate that as a separate bug.

Original Revision: https://phabricator.services.mozilla.com/D219024

Attachment #9419114 - Flags: approval-mozilla-beta?

beta Uplift Approval Request

  • User impact if declined: color glyphs (e.g. emoji) in <canvas> may be missing in some cases
  • Code covered by automated testing: yes
  • Fix verified in Nightly: no
  • Needs manual QE test: no
  • Steps to reproduce for manual QE testing: n/a
  • Risk associated with taking this patch: minimal
  • Explanation of risk level: trivial fix when creating a cached glyph image
  • String changes made/needed: none
  • Is Android affected?: yes
Flags: needinfo?(jfkthame)
Attachment #9419114 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Worth an ESR128 uplift also? Note that we would also need bug 1902253 for it to graft cleanly.

Flags: needinfo?(jfkthame)
Flags: in-testsuite+

The reftest here currently fails on Android for what appears to be an
unrelated reason: reftest-analyzer shows that in the reference case,
all but the last line of text is completely missing.

I'm not sure what's failing there (but it fails similarly without this
patch, anyhow); we should investigate that as a separate bug.

Original Revision: https://phabricator.services.mozilla.com/D219024

Attachment #9420358 - Flags: approval-mozilla-esr128?
Flags: needinfo?(jfkthame)

esr128 Uplift Approval Request

  • User impact if declined: color glyphs may fail to paint in canvas when globalAlpha has been used
  • Code covered by automated testing: yes
  • Fix verified in Nightly: yes
  • Needs manual QE test: no
  • Steps to reproduce for manual QE testing: n/a
  • Risk associated with taking this patch: minimal
  • Explanation of risk level: trivial (one-liner) fix when generating cached glyph image
  • String changes made/needed: none
  • Is Android affected?: yes
Attachment #9420358 - Flags: approval-mozilla-esr128? → approval-mozilla-esr128+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: