Accelerate small 2D canvases whose first draw is a drawImage of an accelerated canvas
Categories
(Core :: Graphics: Canvas2D, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox162 | --- | fixed |
People
(Reporter: mstange, Assigned: mstange)
References
(Blocks 2 open bugs, Regressed 1 open bug)
Details
Attachments
(1 external file)
This is one of the options to fix bug 2093297: pdf.js downscales large canvases by drawing them to a small canvas, so accelerating the small canvas in this scenario would avoid a readback of the large canvas.
| Assignee | ||
Comment 1•10 days ago
|
||
Drawing an accelerated canvas into a canvas below
gfx.canvas.accelerated.min-size (or below 16 pixels in either dimension) makes
the destination a software canvas in the content process. The source then has
to be read back synchronously, and that readback waits for every command
queued in the GPU process before it. pdf.js downscales images in halving steps
through temporary canvases, so its last steps hit this on every image.
If a canvas has no content yet and its first operation is drawImage from an
accelerated 2D canvas, ignore the minimum size and make it accelerated too. The
hint is passed to the GPU process in RecordedCanvasDrawTargetCreation, because
DrawTargetWebgl::Create applies the same size checks there.
Updated•10 days ago
|
Comment 3•9 days ago
|
||
| bugherder | ||
| Assignee | ||
Updated•2 days ago
|
Description
•