Closed Bug 1512287 Opened 11 months ago Closed 9 months ago

Picture caching testing

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
mozilla67
Tracking Status
firefox67 --- fixed

People

(Reporter: jrmuizel, Assigned: bholley)

References

(Blocks 1 open bug)

Details

Attachments

(6 files)

We'd like to be able to reuse Gecko's invalidation tests as well as being able to test in wrench.

To do this we need to be able get a dirty rect out of webrender that gets passed into the appropriate places in Gecko.

For wrench, we want to be able to specify multiple yaml files that are rendered incrementally and then compared to drawing the final yaml from scratch without any caching in between.
Priority: -- → P3

Glenn and I just discussed this.

Hooking up to Gecko's invalidation tests would be useful because it gives us a large body of pre-existing tests. Hooking it up for Wrench would be useful because it makes it easiest for Glenn to add tests for bugs as he fixes them. The latter is more urgent, but I'll see what's involved in the former and how much of the work is the same.

Per discussion, there are two kinds of tests that we want:
(1) Load a series of yaml files to be loaded incrementally, and compare with a final result.
(2) Load two yaml files, and assert what the dirty rects are.

I haven't yet thought enough about this to decide whether they should be separate or unified syntax. I'll think about this more when I have a minute, probably Friday.

Assignee: gwatson → bobbyholley

Glenn was going to link me to the code that manages the dirty rect that I'll need to expose.

Flags: needinfo?(gwatson)

The dirty world rect is calculated and stored here - https://searchfox.org/mozilla-central/source/gfx/wr/webrender/src/picture.rs#1256.

It could possibly also write this to a field in FrameVisibilityState or similar that is then available at the top of the callstack after this pass is complete (the multiple dirty rects patch I'm working on does something similar to this for other reasons).

Flags: needinfo?(gwatson)
Depends on: 1522017

There are various testing-only things we want to do here, specifically
copying around dirty regions, and shrinking the tile size. We could make
each of these specific options and thread them all through to the right
places, but that adds complexity without a use-case. So we just add a
simple testing mode for wrench.

Depends on D17991

Depends on D17992

Per discussion with gw, the current behavior is an oversight. We also
want to expose this to wrench.

Depends on D17993

The current code panics with an out-of-bounds access here if picture
caching is used outside an iframe.

Depends on D17994

Note that the dirty rect assertions don't seem to quite work yet, but
Glenn is going to take over that last piece.

Depends on D17995

Pushed by bholley@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/88d483bf9384
Add a testing mode to WebRender. r=gw
https://hg.mozilla.org/integration/autoland/rev/892ec5349267
Expose dirty regions to wrench. r=gw
https://hg.mozilla.org/integration/autoland/rev/390907343747
Use smaller tiles during testing. r=gw
https://hg.mozilla.org/integration/autoland/rev/fb6f1ac13130
Enable picture caching after 1 frame of identical content, rather than two, and expose constant. r=gw
https://hg.mozilla.org/integration/autoland/rev/7610aa2fbc73
Don't recalculate root_clip_rect if in the root pipeline. r=gw
https://hg.mozilla.org/integration/autoland/rev/65a10a9e93f2
Support incremental invalidation tests in wrench. r=gw
You need to log in before you can comment on or make changes to this bug.