Closed Bug 1745556 Opened 3 years ago Closed 3 years ago

about:support in pdf format from bug 1744334 is terribly slow to load and scroll

Categories

(Core :: Graphics: Canvas2D, defect)

defect

Tracking

()

RESOLVED FIXED
98 Branch
Tracking Status
firefox97 --- disabled
firefox98 --- fixed

People

(Reporter: mayankleoboy1, Assigned: lsalzman)

References

(Blocks 1 open bug, )

Details

Attachments

(6 files)

Enable accelerated canvas
Open this link from bug 1744334 : https://bugzilla.mozilla.org/attachment.cgi?id=9254826
(I think that the Nightly inbuilt pdf reader needs to be used)

ER: Pdf loads, and after loading you can scroll down the pdf
AR: Pdf takes a long time to load. After loading ends, it is very slow to scroll down

Edit: https://share.firefox.dev/3ELZ6P3

Attached file about:support (deleted) —

The severity field is not set for this bug.
:lsalzman, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(lsalzman)

This just tries to add in support for drawing certain stroked rects by reusing
existing shaders and geometry. This solves some low-hanging fruit with certain
test-cases while more general stroked geometry can be added at a later time.

Assignee: nobody → lsalzman
Status: NEW → ASSIGNED

Reading back from the WebGL context to the Skia context if we need to fall back
software rasterization can be extremely expensive. In general, it is better to
try to avoid this by rasterizing primitives in software and then uploading them
to a texture.

This generalizes that idea so that when using the default source-over blend
mode, the Skia context can function as a layer that accumulates recently
drawn primitives and blends them via source-over to the WebGL context when
a flush is necessary.

This generalizes the CacheEntry infrastructure to implement path caching.
This allows us to cache recently drawn paths to a texture which can be then
drawn without falling back to Skia.

Paths using simple solid color patterns will be drawn as alpha masks that
can then have the color applied in the shader. For now, other pattern types
have the pattern baked into the texture to avoid having to complicate the
shader setup for now. In the future, other pattern types could be supported
with new shaders to allow those to be cached as alpha masks as well.

In the service of this, comparison and cloning operators were added to the
Pattern classes to make remembering and matching against them easier for
cache entries.

Severity: -- → S4
Flags: needinfo?(lsalzman)

Depends on D135261

Pushed by lsalzman@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8a66c1a42bfb Support drawing simple stroked geometry. r=jrmuizel https://hg.mozilla.org/integration/autoland/rev/c17c8ec1f577 Support layering of Skia and WebGL contexts in accelerated canvas. r=gfx-reviewers,aosmond https://hg.mozilla.org/integration/autoland/rev/ae505acc7a28 Cache paths to textures to avoid falling back to Skia. r=gfx-reviewers,aosmond https://hg.mozilla.org/integration/autoland/rev/3b192b0c6080 Add support for stroked paths to path cache. r=gfx-reviewers,aosmond

Profile on latest nightly : https://share.firefox.dev/3Gya8sP

Loading and scrolling is much better now.

Regressions: 1750740
QA Whiteboard: [qa-98b-p2]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: