Closed Bug 1122916 Opened 10 years ago Closed 9 years ago

Blurry fonts (losing subpixel AA, possibly some sort of grayscale AA) with APZ enabled

Categories

(Core :: Panning and Zooming, defect, P1)

x86_64
All
defect

Tracking

()

VERIFIED FIXED
mozilla46
Tracking Status
firefox46 --- verified

People

(Reporter: Virtual, Assigned: mstange)

References

Details

(Keywords: nightly-community, regression, Whiteboard: [gfx-noted][fixed by bug 1147673])

Attachments

(4 files, 1 obsolete file)

Fonts will turn blurry with:
apz.subframe.enabled=true
layers.async-pan-zoom.enabled=true

It's very visible in GMail Inbound message list.
This sounds like you guys might know more.
Flags: needinfo?(dvander)
Flags: needinfo?(bugmail.mozilla)
Whiteboard: [gfx-noted]
I can't see any difference in bug2 and nobug2, but I can see a difference in the thin-text message blurb in bug vs nobug. I'm not really sure why enabling APZ would cause that though. Can you check if the layers.low-precision-buffer pref is set to true or not?
Flags: needinfo?(bugmail.mozilla) → needinfo?(BernesB)
Attached image nobug2.png (deleted) —
I attached edited screenshot, it will be better to see it if it's cropped in the same size (before was 1 px too much).

The "layers.low-precision-buffer" is set to false by default, I don't changed it.
Attachment #8550866 - Attachment is obsolete: true
Flags: needinfo?(BernesB)
Ok, based on the discussion in #layout last night I'm cc'ing mstange, as I suspect this is caused by rendering at fractional scroll positions.
A compositor layer tree dump would be very useful for seeing whether that's the issue. This looks like we're *compositing* at fractional layer positions, and not just re-rasterizing content at a different fractional scroll position.
Markus, would compositing at fractional pixels also result in the behavior observed in bug 1085076?
Flags: needinfo?(dvander)
Flags: needinfo?(mstange)
Was "apz.subframe.enabled" preference deleted and removed or hidden in about:config?
(In reply to Virtual_ManPL [:Virtual] from comment #11)
> Was "apz.subframe.enabled" preference deleted and removed or hidden in
> about:config?

It was deleted and removed in bug 1128761.
Thank you very much for info.
Seems like silly me didn't changed search preferences to show also resolved/closed/verified bugs in search results...
Summary: Blurry fonts with "apz.subframe.enabled" and "layers.async-pan-zoom.enabled" set to true → Blurry fonts with "layers.async-pan-zoom.enabled" set to true
I can't reproduce it in latest Nightly.
But I'm curious guy and I found a fix range

Last bad:
https://ftp.mozilla.org/pub/mozilla.org/firefox/tinderbox-builds/mozilla-inbound-win32/1428000215/

First good:
https://ftp.mozilla.org/pub/mozilla.org/firefox/tinderbox-builds/mozilla-inbound-win32/1428000957/

Fix range:
https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=4d6d69f0f499&tochange=d0fc7202b4cb

Looking on these 3 bugs in changelog, I suspect the patches from bug #1148855 fixed this issue.
Status: NEW → RESOLVED
Closed: 9 years ago
Depends on: 1148855
Resolution: --- → FIXED
Whiteboard: [gfx-noted] → [gfx-noted] [fixed by patches from bug #1148855]
Target Milestone: --- → mozilla40
Version: Trunk → 40 Branch
Awww... reopening, as it fixed on http://hawken.herokuapp.com/, but not in other cases like e.g. GMail Inbound message list.

Looks like text is rendered with grayscale antialiasing instead of subpixel antialiasing.
Status: VERIFIED → REOPENED
Resolution: FIXED → ---
Summary: Blurry fonts with "layers.async-pan-zoom.enabled" set to true → Blurry fonts with "layers.async-pan-zoom.enabled" set to true.
Status: REOPENED → NEW
Target Milestone: mozilla40 → ---
Version: 40 Branch → Trunk
Whiteboard: [gfx-noted] [fixed by patches from bug #1148855] → [gfx-noted]
(In reply to Virtual_ManPL [:Virtual] from comment #16)
> Awww... reopening, as it fixed on http://hawken.herokuapp.com/, but not in
> other cases like e.g. GMail Inbound message list.
> 
> Looks like text is rendered with grayscale antialiasing instead of subpixel
> antialiasing.

Could you copy and paste the Graphics section of your about:support?
Sure

Graphics
Adapter Description	NVIDIA GeForce GTX 460 v2
Adapter Drivers	nvd3dumx,nvwgf2umx,nvwgf2umx nvd3dum,nvwgf2um,nvwgf2um
Adapter RAM	1024
Asynchronous Pan/Zoom	none
Device ID	0x1205
Direct2D Enabled	true
DirectWrite Enabled	true (6.2.9200.16571)
Driver Date	3-13-2015
Driver Version	9.18.13.4788
GPU #2 Active	false
GPU Accelerated Windows	1/1 Direct3D 11 (OMTC)
Subsys ID	00000000
Vendor ID	0x10de
WebGL Renderer	Google Inc. -- ANGLE (NVIDIA GeForce GTX 460 v2 Direct3D11 vs_5_0 ps_5_0)
windowLayerManagerRemote	true
AzureCanvasBackend	direct2d 1.1
AzureContentBackend	direct2d 1.1
AzureFallbackCanvasBackend	cairo
AzureSkiaAccelerated	0
Flags: needinfo?(BernesB)
and with "layers.async-pan-zoom.enabled" set to true

Graphics
Adapter Description	NVIDIA GeForce GTX 460 v2
Adapter Drivers	nvd3dumx,nvwgf2umx,nvwgf2umx nvd3dum,nvwgf2um,nvwgf2um
Adapter RAM	1024
Asynchronous Pan/Zoom	wheel input enabled
Device ID	0x1205
Direct2D Enabled	true
DirectWrite Enabled	true (6.2.9200.16571)
Driver Date	3-13-2015
Driver Version	9.18.13.4788
GPU #2 Active	false
GPU Accelerated Windows	1/1 Direct3D 11 (OMTC)
Subsys ID	00000000
Vendor ID	0x10de
WebGL Renderer	Google Inc. -- ANGLE (NVIDIA GeForce GTX 460 v2 Direct3D11 vs_5_0 ps_5_0)
windowLayerManagerRemote	true
AzureCanvasBackend	direct2d 1.1
AzureContentBackend	direct2d 1.1
AzureFallbackCanvasBackend	cairo
AzureSkiaAccelerated	0
FWIW I can also see a difference in font rendering on OS X on https://groups.google.com/forum/#!forum/mozilla.dev.platform with APZ enabled in nightly. The initial rendering of the topics list has "thick" text and then as soon as I scroll it becomes "thin". This reminds me of bug 1080740.
I want to add that I have e10s disabled due to too many bugs which affects me.
FWIW - APZ w/out E10S will just make your general experience worse. (This configuration will be disabled soon in bug 1154739.) The reason is that scrolling is still synchronous and APZ is painting way more pixels so you get extra jank.
I've made some progress here - in the testcase I have, the ContainerLayer for the tab in the child process is not marked opaque, so we don't allow its child layers to have component alpha.
Flags: needinfo?(mstange)
Assignee: nobody → mstange
Status: NEW → ASSIGNED
And that happens because in ContainerState::PostprocessRetainedLayers, due to the display port the PaintedLayer of the scrolled content overflows outside the root ContainerLayer of the tab's LayerManager (which is sized to the tab bounds).
We probably need to fix up that function to respect frame metrics clips.
I feel a lot of blur when scrolling past different content.  
Have set - layers.async-pan-zoom.enabled to true;  

Page tested - https://www.mozilla.org/en-US/firefox/android/  
The section "Keep your private info private" consists a lot of text/images which blur a lot when scrolling with apz and Smooth Scrolling is enabled

The blur effect seems to be quite less with smooth scrolling disabled.

Firefox - 42.0a1 (2015-07-17)
Fedora 22
System Graphics cards - Intel + Nvidia GT 525M

Graphics
Adapter Description	Intel Open Source Technology Center -- Mesa DRI Intel(R) Sandybridge Mobile
Asynchronous Pan/Zoom	wheel input enabled
Device ID	Mesa DRI Intel(R) Sandybridge Mobile
Driver Version	3.0 Mesa 10.6.1 (git-6ff3ae8)
GPU Accelerated Windows	0/2 Basic (OMTC)
Supports Hardware H264 Decoding	false
Vendor ID	Intel Open Source Technology Center
WebGL Renderer	Intel Open Source Technology Center -- Mesa DRI Intel(R) Sandybridge Mobile
windowLayerManagerRemote	true
AzureCanvasBackend	cairo
AzureContentBackend	cairo
AzureFallbackCanvasBackend	none
AzureSkiaAccelerated	0
CairoUseXRender	1
Subpixel AA is lost on google homepage (application list when scrolled) too.

On https://developer.mozilla.org/samples/cssref/background-attachment.html you can see the issue when resizing the window : subpixel AA is lost as soon as the vertical scrollbar appears.

I'm not sure it's proper grayscale AA either, it really looks like subpixel AA transformed to grayscale.
[Tracking Requested - why for this release]: Regression per - Bug #1157745
Version: Trunk → 42 Branch
We'll fix this bug before we let APZ ride the train (bug 1178298); it doesn't need to be tracking 42 because APZ will automatically be off once 42 goes to Aurora.
Based on feedback from nightly users so far I'd say this and bug 1166301 are the two more noticeable regressions with APZ, so I'm bumping them to P1 to indicate that we should try to fix it sooner rather than later (relative to its siblings that are blocking bug 1178298).
Severity: major → normal
Priority: -- → P1
OS: Windows 7 → All
Summary: Blurry fonts with "layers.async-pan-zoom.enabled" set to true. → Blurry fonts (losing subpixel AA, possibly some sort of grayscale AA) with APZ enabled
Refer to Bug 1192219,
Regression window(with forcibly enabled e10s and APZ):
https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=24fe1880f83b&tochange=d3b41b0ead7d

Regressed by: d3b41b0ead7d	David Anderson — Remove apz.subframe.enabled and assume it is always true. (bug 1128761, r=kats)
Blocks: 1128761
No longer blocks: 1192581
Blocks: 1219493
Depends on: 1220371
The same (I guess it's the same) happens on http://agar.io/ when I hover over buttons. Video:
> https://dl.dropboxusercontent.com/s/8zk5674ccpa6ruu/video%20-%20bug%201122916%20agar.io.webm?dl=0
Blocks: 1220371
No longer depends on: 1220371
I can't reproduce the problem in today's Nightly on Linux in any of the mentioned testcases; I wonder whether the problem has been fixed, or it just doesn't affect Linux?
(Or my eyes just aren't sensitive to subpixel artifacts... :D).
Definitely still happening on Win10 with GMail.
Yes, this is definitely still happening, and bug 1147673 will fix it. Unfortunately that one bounced today and I need to look into more test failures.
Bug 1147673 has landed, this is fixed now.
Status: ASSIGNED → RESOLVED
Closed: 9 years ago9 years ago
Resolution: --- → FIXED
Whiteboard: [gfx-noted] → [gfx-noted][fixed by bug 1147673]
Target Milestone: --- → mozilla46
Some of the cases were improved, but comment 39 and bug 1220371 still happen for me on Nightly 46, 20151228030213 (bug 1220371 comment 6). Also, this bug is still reproducible with e10s disabled.
So what is the better way to categorize all these actual bugs?
Please, tell me ASAP so that I wouldn't have to file every case separately  =(
Please file a new bug for comment 39. Bug 1220371 can stay open for now. If you are seeing it with e10s disabled then it is not APZ related and not the same root cause as this bug, so we should use a different bug to track it.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: