Commit c805b9b8 authored by Jacob DeWitt's avatar Jacob DeWitt Committed by Commit Bot

Improve input-selection.html frame rate.

Bring frame rate on debug builds for the input-selection.html webxr
sample page with 2 controllers connected and the gamepad data table
sections expanded from ~10fps to ~40fps by doing the following:
1) Update tables in-place instead of re-creating them on each frame.
2) Only update table data if something changed since the last update
   (instead of unconditionally updating the innerHTML every frame).
3) Only update tables once every 10 frames instead of every frame.
4) Don't create or update gamepad tables unless the related sections
   on the page are expanded. Those sections start as minimized.

Bug: 967844
Change-Id: Ifb10fa3f20a781c5f01632c6b1e1d62e2dd0c04f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1634725
Commit-Queue: Jacob DeWitt <jacde@chromium.org>
Reviewed-by: default avatarAlexander Cooper <alcooper@chromium.org>
Cr-Commit-Position: refs/heads/master@{#664516}
parent 6db6ead4
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment