zoom in on pdf in pdf.js BeginDraw call fails and falls back to d3d 11 layers
Categories
(Core :: Graphics: WebRender, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr68 | --- | unaffected |
| firefox76 | --- | unaffected |
| firefox77 | --- | unaffected |
| firefox78 | --- | fixed |
| firefox79 | --- | fixed |
People
(Reporter: tnikkel, Assigned: bpeers)
References
(Blocks 1 open bug, Regression)
Details
(Keywords: regression)
Attachments
(4 files)
Open
https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf
It should open in pdf.js inside firefox. Hit ctrl-+ until you reach the maximum zoom. The window will go all white and you will lose webrender. In the console you'll get BeginDraw failed and some other error messages.
Regression range
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=77e7a549&tochange=caa55d22
| Reporter | ||
Comment 1•5 years ago
|
||
Note the pdf is the first result for "example pdf", so I suspect it is not a weird pdf.
| Reporter | ||
Updated•5 years ago
|
| Reporter | ||
Comment 2•5 years ago
|
||
| Reporter | ||
Comment 3•5 years ago
|
||
Comment 4•5 years ago
|
||
Can't repro with integrated Intel HD Graphics 630 on Win10 1909. Firefox just becomes slow. (HP Pavilion Power 580-023w)
Comment 5•5 years ago
|
||
:bpeers, can you take a bug? It seemed to be caused by Bug 1628175.
Comment 6•5 years ago
|
||
The error looks similar to Bug 1628901.
Updated•5 years ago
|
Updated•5 years ago
|
Comment 7•5 years ago
|
||
After zooming, the PDF also scrolls jankily (intel HD5500 mobile iGPU) : https://share.firefox.dev/2A5TEer
| Assignee | ||
Updated•5 years ago
|
| Assignee | ||
Comment 8•5 years ago
|
||
Thanks Timothy for finding the regression range and investigating!
I think the issue is that there is no bound on the size of the compositor surface that we might request.
Before my change I believe we had an "accidental" safety guard because past 300% the PDF stops increasing in resolution and instead uses a spatial node transform to scale the remaining part (up to 1000% at most, so another factor ~3.3. This transform would then stop can_promote_to_surface from saying "yes".
I changed this as the limitation is not necessary, and prevents a GL Canvas from being composited if the DPI setting is > 100%. But eventually we go past 16384 pixels and that's when we get "Invalid Parameter".
I added a safety similar to MAX_SURFACE_SIZE. With that, Webrender scales to 1000% and looks identical to non-Webrender.
| Assignee | ||
Comment 9•5 years ago
|
||
Limit the maximum size of surface requests sent to the compositor.
Updated•5 years ago
|
Comment 10•5 years ago
|
||
Comment 11•5 years ago
|
||
| bugherder | ||
Updated•5 years ago
|
Comment 12•5 years ago
|
||
The patch landed in nightly and beta is affected.
:bpeers, is this bug important enough to require an uplift?
If not please set status_beta to wontfix.
For more information, please visit auto_nag documentation.
| Assignee | ||
Comment 13•5 years ago
|
||
Comment on attachment 9154696 [details]
Bug 1643620 - zoom in on pdf in pdf.js BeginDraw call fails r=gw
Beta/Release Uplift Approval Request
- User impact if declined: Rendering errors and corrupt visuals when zooming in on PDF files when using WebRender.
- Is this code covered by automated tests?: No
- Has the fix been verified in Nightly?: Yes
- Needs manual test from QE?: No
- If yes, steps to reproduce:
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): Patch introduce a maximum-size safety limit and falls back to an existing code branch in that case; no new code or functionality is added.
- String changes made/needed:
| Assignee | ||
Comment 14•5 years ago
•
|
||
Requested uplift due to Severity S1.
Edit: I guess "no new code" is not phrased well under "Risks"; what I meant is we select between a fast path and a slow path (compositor/no compositor) and both paths are pre-existing, the patch is just more careful about the conditions under which the fast path can apply. Thanks.
Comment 15•5 years ago
|
||
Comment on attachment 9154696 [details]
Bug 1643620 - zoom in on pdf in pdf.js BeginDraw call fails r=gw
approved for 78.0b7
Comment 16•5 years ago
|
||
| bugherder uplift | ||
Description
•