PageThumbUtils.createSnapshotThumbnail is inefficient

NEW
Unassigned

Status

()

3 years ago
3 years ago

People

(Reporter: mstange, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

3 years ago
On platforms with GPU-accelerated canvas backends and software content drawing, PageThumbUtils.createSnapshotThumbnail is rather inefficient: drawWindow draws content into a main memory backed surface using software rendering, then that surface is drawn to the GPU-accelerated canvas (which does a texture upload), and at the end JS calls toBlob which does readback to get the pixels.

Maybe canvas is not the right place to have the drawWindow method. We could have a tab snapshot API that is implemented in C++.
(Reporter)

Comment 1

3 years ago
And that API should return an ImageBitmap.
You need to log in before you can comment on or make changes to this bug.