Closed Bug 1231396 Opened 9 years ago Closed 8 years ago

Add a painted pixels per second counter

Categories

(Core :: Panning and Zooming, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla48
Tracking Status
firefox48 --- unaffected

People

(Reporter: jrmuizel, Assigned: kats)

References

Details

(Keywords: feature, Whiteboard: [gfx-noted])

Attachments

(1 file, 1 obsolete file)

This would be very helpful to get a feel for how much painting we're doing when using APZ
What's a good place to record this? Somewhere in Moz2D I would imagine. Although... that might pick up other things like thumbnailing which we might not want, so we might need something to enable/disable the counting.
I expect the best place is probably somewhere at the end of layout. i.e. We want to sum the invalidated area each time we paint and send that to the compositor so that it can compute the necessary statistics.
Layout should also probably timestamp the beginning and end of painting so that we have an accurate picture of our painting rate.
I think we already tell the profiler whenever a paint happens, maybe we can also tell it how many pixels were painted for that paint. It already knows how long it took.
No longer blocks: 1218558
Keywords: feature
Whiteboard: [gfx-noted]
Attached patch WIP (obsolete) — Splinter Review
Not sure if this quite correct but it's a start.
No longer blocks: 1254273
Attached patch PatchSplinter Review
Here's a beefed-up version. I used the gfx.logging namespace because setting any pref that starts with "layers.dump" will turn on layers dumping.
Attachment #8738611 - Attachment is obsolete: true
Attachment #8742951 - Flags: review?(mstange)
Comment on attachment 8742951 [details] [diff] [review]
Patch

Review of attachment 8742951 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good. Have you considered adding this to the FPS counter?
Attachment #8742951 - Flags: review?(mstange) → review+
I find the numbers (for the pixels in the last second) vary a lot in practice, from ~0 to upwards of 3 million, on my laptop so I'm not sure how valuable it would be in a transient display like the FPS counter. I did find it useful as output that I could collect and run stats on though.
Assignee: nobody → bugmail.mozilla
Landing for now, if there's a strong desire to see this in the FPS counter I can do so in another bug.
https://hg.mozilla.org/mozilla-central/rev/dc6cc76f3c7e
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: