Closed Bug 1596791 Opened 4 years ago Closed 4 years ago

Canvas updates during empty webrender transactions lead to textures being held for too long.


(Core :: Graphics, defect, P1)




Tracking Status
firefox72 --- fixed


(Reporter: bobowen, Assigned: bobowen)




(1 file)

During empty transactions, WebRenderCanvasRendererAsync unconditionally sends OpUpdatedAsyncImagePipeline commands at [1].
These result in the TextureHost in the parent being held, but because the webrender is empty a render doesn't occur and the texture cannot be released until it does.

If several of these occur in a row then we quickly hit the maximum number of textures allowed in PersistentBufferProviderShared resulting in failure at [2].

The place where we have seen this occur most is in displaying PDFs via PDF.js.


If I invalidate the frame during the processing of OpUpdatedAsyncImagePipeline commands in the GPU process, this causes a frame to be rendered, which is presumably what we want and means the texture can be released.

In order to not invalidate all frames, I've also changed the code in WebRenderCanvasRendererAsync to only send the OpUpdatedAsyncImagePipeline command when a new texture has been sent.
Patch coming soon.

This stops the potential build up of held textures during a series of empty
webrender transactions, because of a render not happening. The patch also only
sends the OpUpdatedAsyncImagePipeline command when a new texture has been
forwarded for the canvas, to prevent unnecessary invalidation.

Pushed by
Invalidate the rendered frame when processing OpUpdatedAsyncImagePipeline commands. r=nical
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla72
You need to log in before you can comment on or make changes to this bug.