Last Comment Bug 776793 - [Azure] transparent text in XUL uses grayscale antialiasing instead of subpixel
: [Azure] transparent text in XUL uses grayscale antialiasing instead of subpixel
Status: VERIFIED FIXED
: regression
Product: Core
Classification: Components
Component: Graphics: Text (show other bugs)
: Trunk
: x86_64 Windows 7
: -- normal with 1 vote (vote)
: mozilla18
Assigned To: Bas Schouten (:bas.schouten)
:
:
Mentors:
Depends on:
Blocks: 715768 774118
  Show dependency treegraph
 
Reported: 2012-07-23 18:48 PDT by Andrew Hurle [:ahurle]
Modified: 2016-08-30 09:00 PDT (History)
15 users (show)
ryanvm: in‑testsuite-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
unaffected
+
unaffected
+
fixed


Attachments
xul (611 bytes, application/vnd.mozilla.xul+xml)
2012-07-25 00:25 PDT, Alice0775 White
no flags Details
When copying in background use CONTENT_COLOR (1.07 KB, patch)
2012-10-01 02:38 PDT, Bas Schouten (:bas.schouten)
joe: review+
lukasblakk+bugs: approval‑mozilla‑beta+
Details | Diff | Splinter Review
Alpha issue in Nautipolis caused by the patch of this bug? (72.96 KB, image/png)
2012-10-04 09:14 PDT, Alfred Kayser
no flags Details

Description Andrew Hurle [:ahurle] 2012-07-23 18:48:50 PDT
STR:
1. Open about:preferences
2. Go to Advanced > General tab
3. Inspect the "Use hardware acceleration when available" label with DOM inspector. Note that the label is currently using subpixel AA.
4. Add a style attribute to the label with value "opacity: 0.99".  

Expected results:
Label with reduced opacity still uses subpixel AA.

Actual results:
Label with reduced opacity changes to grayscale AA.

If you uncheck the HWA checkbox after step 4, the label will switch to desired subpixel AA (and will remain that way even if you restart Nightly and repeat steps 1-4).



This affects the patch in bug 774118.  The text inside a span with opacity < 1 is using grayscale antialiasing instead of subpixel.  If I disable hardware acceleration, the transparent text correctly uses subpixel AA.  This also seems to occur on other XUL elements when their opacity is lowered, but web pages are unaffected AFAICT.  You can see the grayscale AA in this screenshot on Windows 7 on the text "Customize Firefox": https://bugzilla.mozilla.org/attachment.cgi?id=644095

The problem isn't affecting XP or Ubuntu (in VMs). It looks like OSX isn't using subpixel AA regardless of the "LCD font smoothing" setting under System Preferences > General, so I can't say much about it.

I *cannot* reproduce this issue on Firefox 14.

Possibly related to bug 379786 or bug 582223?


about:support Graphics Section, HWA enabled:

        Adapter Description
        Intel(R) HD Graphics Family

        Vendor ID
        0x8086

        Device ID
        0x0126

        Adapter RAM
        Unknown

        Adapter Drivers
        igdumd64 igd10umd64 igd10umd64 igdumdx32 igd10umd32 igd10umd32

        Driver Version
        8.15.10.2538

        Driver Date
        9-26-2011

        Adapter Description (GPU #2)
        NVIDIA Quadro 1000M

        Vendor ID (GPU #2)
        0x10de

        Device ID (GPU #2)
        0x0dfa

        Adapter RAM (GPU #2)
        2048

        Adapter Drivers (GPU #2)
        nvd3dumx,nvwgf2umx,nvwgf2umx nvd3dum,nvwgf2um,nvwgf2um

        Driver Version (GPU #2)
        8.17.12.7658

        Driver Date (GPU #2)
        3-4-2012

        Direct2D Enabled
        true

        DirectWrite Enabled
        true (6.1.7601.17789)

        ClearType Parameters
        ClearType parameters not found

        WebGL Renderer
        Blocked for your graphics card because of unresolved driver issues.

        GPU Accelerated Windows
        1/1 Direct3D 10

        AzureBackend
        direct2d
Comment 1 Matthew N. [:MattN] (In Taipei until Sep. 23) 2012-07-24 15:15:48 PDT
(Quoting Andrew Hurle [:ahurle] from comment #0)
> I *cannot* reproduce this issue on Firefox 14.
Comment 2 Alice0775 White 2012-07-25 00:24:41 PDT
Regression window(m-c)
Good:
http://hg.mozilla.org/mozilla-central/rev/36e938e51481
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/15.0 Firefox/15.0a1 ID:20120522212625
Bad:
http://hg.mozilla.org/mozilla-central/rev/aa2b52bd0374
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/15.0 Firefox/15.0a1 ID:20120523024422
Pushlog:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=36e938e51481&tochange=aa2b52bd0374

Regression window(m-i)
Good:
http://hg.mozilla.org/integration/mozilla-inbound/rev/bbb12d0bcf49
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/15.0 Firefox/15.0a1 ID:20120521220651
Bad:
http://hg.mozilla.org/integration/mozilla-inbound/rev/abbf642df562
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/15.0 Firefox/15.0a1 ID:20120521222950
Pushlog:
http://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=bbb12d0bcf49&tochange=abbf642df562

Triggered by: Bug 715768

An I confirmed that it works as expected if I set gfx.content.azure.enabled = false.
Comment 3 Alice0775 White 2012-07-25 00:25:21 PDT
Created attachment 645669 [details]
xul
Comment 4 Matthew N. [:MattN] (In Taipei until Sep. 23) 2012-07-25 00:48:10 PDT
Awesome work Alice! Thanks a lot.
Comment 5 Lukas Blakk [:lsblakk] use ?needinfo 2012-07-25 16:44:19 PDT
Tracking this regression, would be great to get a fix in so we never ship with this.
Comment 6 Matthew N. [:MattN] (In Taipei until Sep. 23) 2012-07-26 18:14:28 PDT
Bas, do you have an ETA for this fix?  It's blocking bug 774118 which is an intern project and Andrew's internship ends next week. Thanks.
Comment 7 Bas Schouten (:bas.schouten) 2012-07-30 18:54:51 PDT
We should switch off Azure content for now. I'll put up a patch elsewhere.
Comment 8 Bas Schouten (:bas.schouten) 2012-08-01 13:43:33 PDT
Switched off Azure content:
https://hg.mozilla.org/releases/mozilla-beta/rev/5f2f7027b65b
Comment 9 Bas Schouten (:bas.schouten) 2012-09-04 16:34:15 PDT
Hi Roc, question here, although I'm quite puzzled by Azure making a difference here in the first place .. A span with a non 1.0 opacity -should- get grayscale AA, right?
Comment 10 Bas Schouten (:bas.schouten) 2012-09-04 16:35:07 PDT
(In reply to Bas Schouten (:bas) from comment #9)
> Hi Roc, question here, although I'm quite puzzled by Azure making a
> difference here in the first place .. A span with a non 1.0 opacity -should-
> get grayscale AA, right?

Actually, I guess that's not entirely true if -just- the text is partially transparent.
Comment 11 Robert O'Callahan (:roc) (email my personal email if necessary) 2012-09-05 20:53:09 PDT
I don't think it's true at all :-). With HWA on, we should be able to get subpixel AA everywhere (except over the glass parts of the window).
Comment 12 Alex Keybl [:akeybl] 2012-09-18 15:32:44 PDT
Azure support backed out of FF16 in bug 769993.
Comment 13 Lukas Blakk [:lsblakk] use ?needinfo 2012-09-25 17:07:21 PDT
What's the plan here for 17? Are we backing out again?
Comment 14 Robert O'Callahan (:roc) (email my personal email if necessary) 2012-09-26 02:14:37 PDT
Let's not!
Comment 15 Dão Gottwald [:dao] 2012-09-26 02:20:10 PDT
Why not?
Comment 16 Robert O'Callahan (:roc) (email my personal email if necessary) 2012-09-26 02:20:57 PDT
Because we need to fix the bug instead of keep backing out of Azure content.
Comment 17 Dão Gottwald [:dao] 2012-09-26 02:22:12 PDT
Sure. Is it going to be fixed in Firefox 17? How about bug 769993?
Comment 18 Robert O'Callahan (:roc) (email my personal email if necessary) 2012-09-26 02:25:51 PDT
Yes, hopefully Bas can fix these bugs.
Comment 19 Bas Schouten (:bas.schouten) 2012-10-01 02:38:19 PDT
Created attachment 666480 [details] [diff] [review]
When copying in background use CONTENT_COLOR

This makes behavior here analogous to the Cairo version of this function. Pushing an opaque group when we know we're going to copy in an opaque background anyway.
Comment 20 Dão Gottwald [:dao] 2012-10-01 02:42:21 PDT
I'm assuming this is a minimal patch that doesn't quite implement comment 11. Will the latter be spun off to a separate bug?
Comment 21 Bas Schouten (:bas.schouten) 2012-10-02 00:06:01 PDT
(In reply to Dão Gottwald [:dao] from comment #20)
> I'm assuming this is a minimal patch that doesn't quite implement comment
> 11. Will the latter be spun off to a separate bug?

No, it should more or less implement it properly. Although there might still be some cases where BasicLayers ruins it for us.
Comment 22 Ryan VanderMeulen [:RyanVM] 2012-10-02 18:48:58 PDT
https://hg.mozilla.org/mozilla-central/rev/b36ff62f95b3
Comment 23 Alfred Kayser 2012-10-04 09:14:35 PDT
Created attachment 668015 [details]
Alpha issue in Nautipolis caused by the patch of this bug?

Is this rendering issue caused by this patch?
I will await the next nightly and retest, because it could also have been caused by 778367 and the correspondig fix for that:
Bug 797314 - Strange artifacts on some sites
Comment 24 Lukas Blakk [:lsblakk] use ?needinfo 2012-10-15 09:04:49 PDT
Can someone verify this on trunk and nominate for uplift to Beta if the issue is verified fixed?  We'll want this in tomorrow's Beta go to build so please nominate as soon as possible.
Comment 25 Anthony Hughes (:ashughes) [GFX][QA][Mentor] 2012-10-15 16:12:31 PDT
I will need far more detailed steps to reproduce which assumes complete unfamiliarity with DOM Inspector as I'm having a hard time reproducing this. Thanks.
Comment 26 Dão Gottwald [:dao] 2012-10-17 08:13:12 PDT
Verified fixed with the latest nightly on Win7 and AzureContentBackend = direct2d.
Comment 27 Anthony Hughes (:ashughes) [GFX][QA][Mentor] 2012-10-17 11:36:03 PDT
Lukas, give that we missed Beta 2, did we want to try to get this in for Beta 3?
Comment 28 Lukas Blakk [:lsblakk] use ?needinfo 2012-10-21 09:44:04 PDT
(In reply to Anthony Hughes, Mozilla QA (:ashughes) from comment #27)
> Lukas, give that we missed Beta 2, did we want to try to get this in for
> Beta 3?

Yes, absolutely.  Please nominate for uplift now that this is verified - we'll need this to land by EOD PT tomorrow (Monday)
Comment 29 Anthony Hughes (:ashughes) [GFX][QA][Mentor] 2012-10-21 16:34:05 PDT
Comment on attachment 666480 [details] [diff] [review]
When copying in background use CONTENT_COLOR

Requesting approval for Beta based on comment 28.
Comment 30 Bas Schouten (:bas.schouten) 2012-10-22 15:11:31 PDT
This patch has never been tested without bug 778367 and the subsequent patches in Bug 797314, Bug 797231 and Bug 797797. I think the safe option is to push this along with those patches in the next beta to ensure we actually have had Aurora test coverage.

The risk of breaking beta otherwise appears too high.
Comment 31 Lukas Blakk [:lsblakk] use ?needinfo 2012-10-22 17:43:23 PDT
Thanks Bas, we'll hold off on all your Azure bugs and go for Beta 4 with all of them
Comment 32 Lukas Blakk [:lsblakk] use ?needinfo 2012-10-29 10:07:43 PDT
Ok the patches in  bug 778367 and the subsequent patches in Bug 797314, Bug 797231 and Bug 797797 have all been approved.  Please get this (and those patches) in today so that we're set for Beta 4 and we can take a look this week for any regressions that would block shipping Azure in 17.
Comment 33 Bas Schouten (:bas.schouten) 2012-10-29 17:48:22 PDT
http://hg.mozilla.org/releases/mozilla-beta/rev/473fb60e6a6b

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