Closed Bug 1319170 Opened 5 years ago Closed 5 years ago

Make reftests in webrender faster

Categories

(Core :: Graphics: WebRender, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla54

People

(Reporter: mchang, Assigned: mchang)

References

Details

(Whiteboard: gfx-noted)

With the first implementation in bug 1318100, it's a bare minimum implementation that's pretty slow with lots of copies. We can do a couple of things to make it faster:

1) On the gecko side, used shared memory instead of an out parameter to copy the reftest snapshot data. This is bug 1318113.
2) On the rust side, gl::read_pixels will allocate a new buffer, which we have to callback into rust to free [1]. It'd be nice to change this interface so that we can pass in a buffer and write the gpu readback into it. Then we could use the shared buffer from (1) all the way down the rust stack instead of doing the copies we do now.
3) Clean up how we use the flush notification [2] and instead use Epochs. What Servo does is it waits for the regular paint notifications and compares epochs. When the correct epoch is rendered, Servo does the snapshot. Right now, all of bindings ignores the epoch parameter.

[1] https://github.com/servo/gleam/blob/master/src/gl.rs#L70
[2] https://hg.mozilla.org/projects/graphics/file/tip/gfx/webrender_bindings/src/bindings.rs#l526
Assignee: nobody → mchang
Depends on: 1318100, 1321417
Whiteboard: gfx-noted
Depends on: 1321845
Pushed by mchang@mozilla.com:
https://hg.mozilla.org/projects/graphics/rev/079ea53006fd
Readback gpu directly into shared texture buffer for reftests. r=sotaro?
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
(In reply to Pulsebot from comment #2)
> Pushed by sikeda@mozilla.com:
> https://hg.mozilla.org/projects/graphics/rev/107be60292a4
> Fix build failure r=mchang

This doesn't appear to have ever been reviewed by mchang. Please use r=mchang? or r=bustage or something like that unless it has actually already been reviewed.
Depends on: 1331828
Target Milestone: --- → mozilla54
You need to log in before you can comment on or make changes to this bug.