Open Bug 1604546 Opened 5 years ago Updated 2 years ago

Eliminate copy when writing into PBOs

Categories

(Core :: Graphics: WebRender, enhancement, P3)

enhancement

Tracking

()

Tracking Status
firefox73 --- affected

People

(Reporter: mstange, Unassigned)

References

(Depends on 1 open bug, Blocks 2 open bugs)

Details

(Filing this bug after a conversation with :kvark about texture upload improvements:)

At the moment there is a copy between data that the RenderBackend generates and the PBO main-memory representation that is used for texture upload.
We should eliminate this copy.

The hard part of doing so is communicating a pointer from the renderer thread (which calls the OpenGL function to map a buffer) to the RenderBackend thread (which needs to know where to write the data). We can do this by having a number of buffers around, and by having a fallback path in case there is no existing buffer. This fallback path would do what's done at the moment: Create an allocation on the RenderBackend thread to write the data into, and then copy the data into a new buffer mapping on the Renderer thread.

Blocks: wr-mac
Priority: -- → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.