Closed Bug 1518840 Opened 6 years ago Closed 6 years ago

Missing text-shadow when a lot of text has the property

Categories

(Core :: Graphics: WebRender, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla66
Tracking Status
firefox66 --- fixed

People

(Reporter: nical, Assigned: u480271)

References

Details

Attachments

(6 files)

Go to any page with a lot of text (for example https://www.w3.org/TR/html52/single-page.html) and add the property text-shadow: black 0px 0px 10px; such that it applies to a lot of text. Then scroll around, you should see some text missing the shadow, when scrolling away and back it's not necessarily the same text that misses its shadows.

Priority: -- → P3

Getting rid of the blur on the text-shadow stops this from reproducing. Is there a limit to how many blur filters we will draw in a given frame?

Each blurred shadow seems to also create a picture, so maybe the limit is on those?

Any ideas Glenn?

Flags: needinfo?(gwatson)
Attached file test case

There's no specific limit on pictures and / or blur filters. This will require more detailed investigation to see what is happening.

Flags: needinfo?(gwatson)
Current implementation of peek() on iterator destroys the current item. Since iterator has immutable share of the underlying data stream, cloning of iterator allows `forking` of an iterator to peek at the next item with out losing access to the current item.
Motivated by pattern of PushShadow/Text/PopAllShadows/PushShadow/... when processing blocks of text, skip PopAllShadows/PushShadow pair if the PushShadow contains a shadow compatible, ie. shadows that have the same attributes offset, blur, color, etc, with the current open shadow. Depends on D16434

:mattwoodrow points out my patches might just hide the missing shadows because the collapse renders fewer shadows. I'll investigate the before patch situation.

Attached image renderdoc.png

I've investigated what is happening to the missing text-shadows and I can see that they are being rendered but the texture cache entry for the shadow is empty (ie. all alpha is 0). I captured the rendering in RenderDoc and looked at the texture 2d array to confirm this. (see renderdoc attachment)

I've checked the submission of the picture primitives and the texture cache appears to report that the entries are valid.

Also, if you keep scrolling down slowly, no new shadows are added after some point.

Assignee: nobody → dglastonbury

Working with :emilio and :gw on the issue of double rendering of blurs it was hit on that instead of using the texture cache that using picture caching might be a better solution. Switching from texture cache to picture cache fixes the issue of missing shadows.

Caching text-shadows into texture cache was leading to rendering artifacts with
missing shadows. Switch to using the picture path for all picture blurs and
rely upon picture caching to reduce repetitive work.

I notice that with picture caching that we don't get batching of the initial text runs like we did when using texture cache. I'm opening a follow up bug to investigate that.

Blocks: 1522036

Depends on D17329

Attachment #9038445 - Attachment description: Bug 1518840 - P1: Remove rendering blurs into texture cache. , emilio → Bug 1518840 - P1: Remove rendering blurs into texture cache.
Pushed by dglastonbury@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/48cff9538a5e P1: Remove rendering blurs into texture cache. r=gw,emilio https://hg.mozilla.org/integration/autoland/rev/fdb28a194129 P2: Clean up dead code warnings. r=gw
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla66
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: