Closed Bug 1910480 Opened 1 year ago Closed 1 year ago

Large or zoomed text in a Google Doc is heavier and has jaggier outlines in Fx 130 than in Fx 129

Categories

(Core :: Graphics: Canvas2D, defect)

Unspecified
Windows
defect

Tracking

()

RESOLVED FIXED
132 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox-esr128 --- unaffected
firefox128 --- unaffected
firefox129 --- unaffected
firefox130 --- disabled
firefox131 --- disabled
firefox132 --- fixed

People

(Reporter: cpeterson, Assigned: lsalzman)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression)

Attachments

(5 files)

Lee, I believe this bug is a regression from Canvas2D bug 1910138. I bisected this regression to this pushlog:

https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=558cc2be01df4b4c540144cf71e2030e9e001972&tochange=2f15b6efa24884286c84068c76b9b21a7c2ee134

Steps to reproduce

  1. Load a Google Doc with large text, such as https://docs.google.com/document/d/1-StnV8BT0Be-g_7KF-7FIPPyYW4PtC7Vqsym4VvnI-A/edit
  2. Also try zooming the doc to see different sizes of large text.

Expected results

Large text should have smooth outlines.

Actual results

Large text at some font sizes or zoom levels has jagged edges. Compare the attached screenshots.

Flags: needinfo?(lsalzman)
Attached file about-support.txt

I'm testing on a Windows laptop with an external monitor. Here is my about:support information.

The text rendering looks worse on my external monitor (display scale "150% (Recommended)") than on my laptop's built-in display (display scale "250% (Recommdended)").

Attachment #9416676 - Attachment description: screenshot.png → comparison-screenshot.png

I also see some pixels disappear intermittently when switching away from and then back to a Google Docs tab. The pixels reappear a second or two after I focus the Google Doc.

Severity: -- → S3
Flags: needinfo?(lsalzman)

:lsalzman, since you are the author of the regressor, bug 1910138, could you take a look?

For more information, please visit BugBot documentation.

Flags: needinfo?(lsalzman)
Flags: needinfo?(lsalzman)

Setting firefox130=disabled because Canvas2D is disabled in Nightly only.

Attached image image.png

I am also seeing this on Windows, Night 130. Google Docs and Google Sheets both seem to be impacted (image is from docs).

Can you please post your about:support information?

Flags: needinfo?(cpeterson)

Jonathan, this seems superficially like DrawTargetSkia::GetGlyphLocalBounds may be returning something inaccurate. Do you have a Windows machine you could check on?

Flags: needinfo?(jfkthame)

(In reply to Lee Salzman [:lsalzman] from comment #6)

Can you please post your about:support information?

Here is my about:support information:

https://bug1910480.bmoattachments.org/attachment.cgi?id=9416678

Flags: needinfo?(cpeterson)
See Also: → 1910869

The original reported bug in comment 1 seems like it may be related to the preblending issue in 1910869. Just that this would be the manifestation of preblending going wrong when grayscale AA is applied as opposed to subpixel AA.

Flags: needinfo?(jfkthame)
See Also: → 1913869
Status: NEW → RESOLVED
Closed: 1 year ago
Duplicate of bug: 1913869
Resolution: --- → DUPLICATE
See Also: 1910869
See Also: 1913869

Digging into this, I found another potential cause for this.

Status: RESOLVED → REOPENED
No longer duplicate of bug: 1913869
Resolution: DUPLICATE → ---

Gamma-aware ClearType rendering is used on Windows even when requesting
grayscale AA, as we still sample the approximate luminance of the ClearType
result to generate the grayscale result. To compensate for this, we have to
use preblending for grayscale AA, even when no subpixel AA is requested.

Assignee: nobody → lsalzman
Pushed by lsalzman@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/93b600e508e8 Use preblending in DrawTargetWebgl for grayscale AA on Windows. r=aosmond

(In reply to Chris Peterson [:cpeterson] from comment #2)

Created attachment 9416693 [details]
missing-pixels-screenshot.png

I also see some pixels disappear intermittently when switching away from and then back to a Google Docs tab. The pixels reappear a second or two after I focus the Google Doc.

Is there any more specific repro method available? I've been trying opening Google docs and sheets, tabbing within a Firefox window, tabbing out and back in Firefox itself, minimizing/maximizing and so far nothing has succeeded at reproducing those symptoms you were seeing with the disappearing text. So far, everything seems to look fine, minus the jagginess issue which I fixed separately.

Note: for testing, you can re-enable the experiment of enabling AC2D on Windows by just toggling the following prefs:
gfx.direct2d.disabled: true
gfx.canvas.accelerated: true

Flags: needinfo?(cpeterson)
Status: REOPENED → RESOLVED
Closed: 1 year ago1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 132 Branch

\o/\o/\o/\o/\o/\o/\o/
This is a great improvement. This patch finally makes text crisp on Canvas with gpu-canvas.

Blocks: gpu-canvas

(In reply to Lee Salzman [:lsalzman] from comment #14)

Is there any more specific repro method available? I've been trying opening Google docs and sheets, tabbing within a Firefox window, tabbing out and back in Firefox itself, minimizing/maximizing and so far nothing has succeeded at reproducing those symptoms you were seeing with the disappearing text. So far, everything seems to look fine, minus the jagginess issue which I fixed separately.

Note: for testing, you can re-enable the experiment of enabling AC2D on Windows by just toggling the following prefs:
gfx.direct2d.disabled: true
gfx.canvas.accelerated: true

After setting those prefs in Nightly 133 this morning, I have seen a few instances of Google Docs text missing some pixels, but the problem is MUCH less frequent than in Nightly 130 two months ago.

Should I file a new bug for this "missing pixels" issue, since this bug 1910480 is specifically about font weight and has been resolved fixed? Is there a meta bug for enabling the gfx.direct2d.disabled and gfx.canvas.accelerated prefs?

Unfortunately, I don't have reliable STR, but I usually notice the missing pixels when I switch to a Google Docs tab. A few works, usually on the left margin, are missing some pixels, but they appear in a second later when Google Docs repaints the canvas or I scroll the page.

I'll keep these prefs enabled and see if I find better STR or capture a screenshot.

Flags: needinfo?(cpeterson) → needinfo?(lsalzman)

Definitely let's file a new bug, as it will be easier to track the bug separate from the font jagginess issue which had a different cause.

Flags: needinfo?(lsalzman)
See Also: → 1920753

(In reply to Lee Salzman [:lsalzman] from comment #18)

Definitely let's file a new bug, as it will be easier to track the bug separate from the font jagginess issue which had a different cause.

I filed bug 1920753 for issue about pixels disappearing in Google Docs.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: