Skip to content
New issue

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

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

Already on GitHub? # to your account

WR asserts if text display items have over 2,000 glyphs or so #3814

Open
pcwalton opened this issue Dec 14, 2019 · 3 comments
Open

WR asserts if text display items have over 2,000 glyphs or so #3814

pcwalton opened this issue Dec 14, 2019 · 3 comments

Comments

@pcwalton
Copy link
Contributor

Servo now contains a workaround for this that splits display items, but it's fragile (contains hardcoded limits), and I think it's probably best for WR to split up the runs itself.

More details:

servo/servo#17230 (comment)

servo/servo#25289 (comment)

@gw3583
Copy link
Contributor

gw3583 commented Dec 15, 2019

WR has had this issue before on Gecko and has code in place to handle it. During DL construction, it splits a long text run into multiple display items [1].

It would be interesting to know why that's not working in this case. Perhaps layout of the GPU data has changed and that splitting threshold constant is wrong?

[1]

for split_glyphs in glyphs.chunks(MAX_TEXT_RUN_LENGTH) {

@jdm
Copy link
Member

jdm commented Dec 16, 2019

Aha - our code that builds a webrender display list calls push_item directly instead of push_text: https://github.com/servo/servo/blob/b7aaff499501e0f1f0d411db5059f59e4828419d/components/layout/display_list/webrender_helpers.rs#L113-L117

@gw3583
Copy link
Contributor

gw3583 commented Dec 16, 2019

Huh, it looks like most of the DL building is calling the lower level APIs instead of the push_[item] APIs.

No massive rush to change it, but it probably makes sense to use the main public API (I actually had no idea those lower level builder methods were public 😮 )

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants