• Ian Vollick's avatar
    [vr] Avoid some unnecessary work in UpdateWorldSpaceTransforms · a002a087
    Ian Vollick authored
    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: default avatarTibor Goldschwendt <tiborg@chromium.org>
    Commit-Queue: Ian Vollick <vollick@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#548075}
    a002a087
ui_scene.cc 6.51 KB