Closed Bug 1875670 Opened 8 months ago Closed 8 months ago

Bugzilla comment with lots of emojis checkerboards quite bad while scrolling (and is fixed with COLR disabled)

Categories

(Core :: Graphics: Text, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
124 Branch
Tracking Status
firefox124 --- fixed

People

(Reporter: mayankleoboy1, Assigned: jfkthame)

References

(Regressed 2 open bugs, )

Details

Attachments

(3 files)

Go to https://bugzilla.mozilla.org/show_bug.cgi?id=1492605
Scroll down.

AR: as you scroll down, the first comment ha lots of emojis. The page will checkerboard.
ER: Not so

COLR enabled: https://share.firefox.dev/48GJRH0
COLR disabled: https://share.firefox.dev/3SrrHDm

Chrome does not checkerboard.

This is probably a known "rendering lots of COLR stuff is currently slower in Firefox" issue. Feel free to dupe to existing bugs.

This does not change behavior for users; it is preparation for the
following patch, which will want the ability to hold an additional
strong reference to a resolved palette. So we can no longer just own it
via a UniquePtr; we make it a RefPtr instead.

Assignee: nobody → jfkthame
Status: NEW → ASSIGNED

This substantially improves performance when lots of repeated Segoe UI
Emoji (Win11) glyphs are present, because they're quite expensive to
render "from scratch" every time. (Other COLRv1 fonts will tend to
benefit somewhat as well, though not all are as complex/expensive to
paint as the Segoe UI Emoji glyphs.)

Here's a profile of scrolling up and down a couple of times on the page
https://bugzilla.mozilla.org/show_bug.cgi?id=1492605 without this patch:
https://share.firefox.dev/3Slvrox

With this patch added, the profile looks vastly better:
https://share.firefox.dev/3OjzEb5

See Also: → 1870986
Pushed by jkew@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e856837a7620 Create a refcounted object for resolved color-font palette, instead of just a bare nsTArray. r=gfx-reviewers,lsalzman https://hg.mozilla.org/integration/autoland/rev/7a928b432ee6 Add a cache for rasterized COLRv1 glyphs, because fully redrawing them on each use can be expensive. r=gfx-reviewers,lsalzman
Pushed by jkew@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c61f793c65da Create a refcounted object for resolved color-font palette, instead of just a bare nsTArray. r=gfx-reviewers,lsalzman https://hg.mozilla.org/integration/autoland/rev/55747feb0e20 Add a cache for rasterized COLRv1 glyphs, because fully redrawing them on each use can be expensive. r=gfx-reviewers,lsalzman

Backed out for causing build bustages.

Pushed by jkew@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/649109bd35ad Create a refcounted object for resolved color-font palette, instead of just a bare nsTArray. r=gfx-reviewers,lsalzman https://hg.mozilla.org/integration/autoland/rev/bfaba1a0d7ab Add a cache for rasterized COLRv1 glyphs, because fully redrawing them on each use can be expensive. r=gfx-reviewers,lsalzman
Flags: needinfo?(jfkthame)
Pushed by imoraru@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8f45af2a9170 followup - fix build failure in fuzz/TestCOLRv1.cpp. r=fix CLOSED TREE
Status: ASSIGNED → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → 124 Branch

The improvement is dramatic in the latest Nightly: https://share.firefox.dev/3SNdEbC

Blocks: 1870986
See Also: 1870986
Duplicate of this bug: 1839855
Regressions: 1908261
Regressions: 1912431
Regressions: 1912463
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: