Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

webrender: rendered glyphs corruption (possibly `text-shadow`-related) #10020

Closed
pygy opened this issue Mar 15, 2016 · 8 comments
Closed

webrender: rendered glyphs corruption (possibly `text-shadow`-related) #10020

pygy opened this issue Mar 15, 2016 · 8 comments

Comments

@pygy
Copy link

@pygy pygy commented Mar 15, 2016

Here's a first reduced text case for #9849. Specs: Mac OS X 10.10.5, Intel HD Graphics 4000. Servo last updated seconds ago (thus pulled ~30 min earlier).

This is webrender-only.

Capture:

screen shot 2016-03-15 at 21 43 41

Live: http://pygy.github.io/servo-rendering-bugs/j2c/j2c/glyphs.html
Source: https://github.com/pygy/servo-rendering-bugs/blob/gh-pages/j2c/j2c/glyphs.html

The oddest thing is that The affected glyphs change from one run to the next. I don't know how you implemented this, but I'll take a guess based on how these things are often done: it looks like the glyph cache is poisoned. The glitch disappears if you remove the h6, its text-shadow or even its font-size.

As you can see the same characters are mangled identically. It isn't visible in the screenshot, but if you scroll further down, you'll see that text whose only difference is a larger font-size is rendered correctly. This leads me to believe that the corruption occurs at the rendered glyph level, rather than at the vector coordinates level.

The glitch isn't always visible. With the example as is, corruption occurs most of the time in the normal-sized <code> elements, and rarley in the <h6> text. Modifying the CSS and/or markup may move the corruption elsewhere.

Please note that webrender also doesn't show the text-shadow.

If memory is corrupted beyond the glyph cache, this may well explain other parts of #9849... I guess the nice thing when you use Rust is that you know where to look when memory is corrupted.


@jdm
Copy link
Member

@jdm jdm commented Mar 15, 2016

@jdm jdm added the A-gfx/rendering label Mar 15, 2016
@pygy
Copy link
Author

@pygy pygy commented Mar 15, 2016

Alternatively, these could be bad reads: the bad <code> glyphs may erroneoulsy be reading the <h6> memory...

@pcwalton
Copy link
Contributor

@pcwalton pcwalton commented Mar 15, 2016

I suspect undefined behavior, possibly because a texture unit is bound to the current FBO render target.

@pygy
Copy link
Author

@pygy pygy commented Mar 16, 2016

The full site in #9849 (and its noJS counterpart) change text-shadow on mouseover (Logo and GitHub ribbon).

Hovering these parts of the page cause the glyph glitches to change.

@pygy
Copy link
Author

@pygy pygy commented Mar 16, 2016

Oddly enough, the latter only occurs when loading the page from my hard disk using file:///...

@nox
Copy link
Member

@nox nox commented Oct 1, 2017

I can't reproduce this anymore.

@nox nox closed this Oct 1, 2017
@pygy
Copy link
Author

@pygy pygy commented Oct 1, 2017

I can't either with my current machine (a more recent MacBook Air), and I don't have the old one anymore (turns out that driving over a computer is semi-fatal for the poor thing).

@nox
Copy link
Member

@nox nox commented Oct 1, 2017

(turns out that driving over a computer is semi-fatal for the poor thing).

I knew doing issue triage would be worth something, thanks for the good laugh.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.