[vr] Avoid some unnecessary work in UpdateWorldSpaceTransforms
Previously, we would do the local update unconditionally. With this change, we keep track of a dirty bit for the world space transform as well as a baked version of the local transform so we don't need to call cc::TransformOperations::Apply repeatedly to realize the same results. Some elements have special conditions for the dirtiness of their local transform, so I have also created a ShouldUpdateWorldSpaceTransform function so that subclasses can customize this behavior. The reticle, for example, is always dirty. Bug: 828684 Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_vr;master.tryserver.chromium.win:win_optional_gpu_tests_rel Change-Id: I5b581a72d7caa39d47dcdc686d212879b3da3093 Reviewed-on: https://chromium-review.googlesource.com/995573Reviewed-by:Tibor Goldschwendt <tiborg@chromium.org> Commit-Queue: Ian Vollick <vollick@chromium.org> Cr-Commit-Position: refs/heads/master@{#548075}
Showing
Please register or sign in to comment