Closed Bug 1418869 Opened 2 years ago Closed 2 years ago

WebRenderImageData::UpdateImageKey is slow

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
mozilla59
Tracking Status
firefox59 --- fixed

People

(Reporter: ethlin, Assigned: ethlin)

References

(Blocks 1 open bug)

Details

(Whiteboard: [wr-mvp])

Attachments

(1 file)

Gecko profiler link: https://perfht.ml/2hwBjdL

We copy the buffer in GetAsSourceSurface[1] when the image is a TextureWrapperImage. For fallback items, we shouldn't try to share them.

[1] https://dxr.mozilla.org/mozilla-central/rev/a3f183201f7f183c263d554bfb15fbf0b0ed2ea4/gfx/layers/ipc/SharedSurfacesChild.cpp#258
Whiteboard: [wr-mvp] [triage]
Status: NEW → ASSIGNED
Priority: -- → P1
Whiteboard: [wr-mvp] [triage] → [wr-mvp]
According to the gecko profiler, 22% of the RenderLayer is in WebRenderImageData::UpdateImageKey.
Comment on attachment 8929960 [details]
Bug 1418869 - Do not try to share the fallback images.

https://reviewboard.mozilla.org/r/201120/#review206326

Nice catch. I did not consider how expensive GetAsSourceSurface could be for some types.
Attachment #8929960 - Flags: review?(aosmond) → review+
Pushed by ethlin@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ec7ff1ef12d3
Do not try to share the fallback images. r=aosmond
https://hg.mozilla.org/mozilla-central/rev/ec7ff1ef12d3
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
You need to log in before you can comment on or make changes to this bug.