Closed Bug 2094308 Opened 11 days ago Closed 9 days ago

Accelerate small 2D canvases whose first draw is a drawImage of an accelerated canvas

Categories

(Core :: Graphics: Canvas2D, task)

task

Tracking

()

RESOLVED FIXED
162 Branch
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.

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.

Assignee: nobody → mstange.moz
Status: NEW → ASSIGNED
Pushed by mstange@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/5ea13f1aeb4a https://hg.mozilla.org/integration/autoland/rev/656225c90290 Accelerate small 2D canvases whose first draw is an accelerated canvas. r=lsalzman
Status: ASSIGNED → RESOLVED
Closed: 9 days ago
Resolution: --- → FIXED
Target Milestone: --- → 162 Branch
Regressions: 2096586
Blocks: speedometer4
QA Whiteboard: [qa-triage-done-c163/b162]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: