Closed Bug 1297178 Opened 8 years ago Closed 8 years ago

Subpixel antialiasing sometimes ignores text color [regression]

Categories

(Core :: Graphics: Text, defect)

46 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla51
Tracking Status
firefox50 --- wontfix
firefox51 --- fixed

People

(Reporter: linuxhippy, Assigned: lsalzman)

References

Details

(Keywords: regression, Whiteboard: [gfx-noted])

Attachments

(3 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0
Build ID: 20160818050015

Steps to reproduce:

1. Opened gmail



Actual results:

Observed subpixel AA is broken for gmail's red "Inbox" text


Expected results:

The text is subpixel antialiased as if the font color was black.
this is actually a regression, it has been reported as bug 833850 and bug 828206, was fixed in the meantime but is now broken again.
When setting layers.acceleration.force-enabled=true, the issue seems to vanish - so it seems to happen only without opengl accelerated rendering.
Component: Untriaged → Graphics: Text
Product: Firefox → Core
Does this still happen with nightly if you disable layers acceleration?
Flags: needinfo?(linuxhippy)
Whiteboard: [gfx-noted]
Sure, I can reproduce it with Nightly and a clean profile with layer acceleration disabled
Flags: needinfo?(linuxhippy)
I can confirm that this happens on nightly with layers acceleration disabled as well.

With Skia content I only get grayscale AA for the Inbox text, vs. subpixel AA for the email headings. That in and of itself wouldn't necessarily be a bug, since some cases may legitimately disable subpixel AA, and the grayscale AA is at least rendered correctly. What is odd is it diverges from what Cairo seems to be doing here.

On Cairo content, I get the symptoms as described above for the Inbox text.

I suspect this may be a case of subpixel AA being used on a non-opaque layer. I am still investigating to find out what's going on...
Status: UNCONFIRMED → NEW
Ever confirmed: true
The cairo_surface_set_subpixel_antialiasing extension is not honored by image surfaces. So when we disabled Xrender (or with Xrender on with system Cairo), subpixel AA was always being used even in cases where it needed to be disabled like on BGRA surfaces.

This fix will work on cairo-ft for both tree and system Cairo, so I opted for it instead of messing with a Cairo-specific change. As ideally we want to reduce dependencies on tree Cairo modifications where possible these days in the hope of one day being able to use system Cairo, this seemed like a better way to go about it.
Assignee: nobody → lsalzman
Status: NEW → ASSIGNED
Attachment #8785356 - Flags: review?(jmuizelaar)
This was a regression caused by bug 1180942, which landed in 46, where we disabled Xrender for content rendering. The cairo_surface_set_subpixel_antialiasing setting was only used by xlib surfaces, but not by image surfaces.

We should uplift fix this once it lands.
Keywords: regression
Version: 49 Branch → 46 Branch
Attachment #8785356 - Flags: review?(jmuizelaar) → review+
Pushed by lsalzman@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/3c2b69f54e9b
disable explicit subpixel AA when not permitted in DrawTargetCairo::FillGlyphs. r=jrmuizel
As far as I understood, your patch will disable subpixel AA for the reported content.

However, Google-Chrome is able to render the label with subpixel-antialiasing enabled, please see the screenshot attached.
https://hg.mozilla.org/mozilla-central/rev/3c2b69f54e9b
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
(In reply to Clemens Eisserer from comment #11)
> As far as I understood, your patch will disable subpixel AA for the reported
> content.
> 
> However, Google-Chrome is able to render the label with
> subpixel-antialiasing enabled, please see the screenshot attached.

The patch does not disable subpixel AA. Subpixel AA was already disabled higher up, and the backend was not respecting the decision, which caused the problem, since we can't render subpixel AA into a transparent surface.

I would encourage you to file the issue that subpixel AA has been disabled for that layer as a new bug, so we can let at least this particular issue be resolved.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: