Open Bug 1161636 Opened 6 years ago Updated 5 years ago

Avoid Copying canvas 2d into a new TextureClient each frame.


(Core :: Graphics: Layers, defect)

Not set




(Reporter: nical, Assigned: bas.schouten)


(Blocks 2 open bugs)


(Keywords: feature)

Currently CanvasRenderingContext2D keeps its own DrawTarget which it draws into and copies the whole thing in a TextureClient after each frame to share it with the Compositor.

We should do the following things:
 * draw directly into a TextureClient
 * share this TextureClient with the compositor without copying it at the end of the frame
 * use a new TextureClient for each frame and only copy from the previous TextureClient if the first drawing operation does not overwrite all of the canvas' pixels

Eventually use a pool to reduce the overhead of creating and destroying textures each frame, but we already pay that cost so we can track the pool as an orthogonal improvement (could be done in bug 1008221).
Blocks: 1161818
Assignee: nobody → bas
Blocks: 1181006
No longer blocks: 1181006
Keywords: feature
Blocks: 1290072
You need to log in before you can comment on or make changes to this bug.