• Ian Vollick's avatar
    [vr] Fix reticle rendering over invisible elements · f81cf54a
    Ian Vollick authored
    In https://chromium-review.googlesource.com/c/chromium/src/+/675788, I
    regressed rendering by a late change to how non-renderable elements
    were handled. In that CL, non-renderable elements were assigned to
    draw phase kPhaseNone.
    
    The logic in UiScene was also updated to make use of draw phases in
    conjunction with the tree hierarchy to return swaths of UiElements to
    render.
    
    The net effect is that the back plane, though hit testable, was not
    included in the list of elements to render. So when it came time to
    place the reticle atop the the backplane, the element was not in the
    list, so the reticle never appeared.
    
    Fixing the issue is not quite as simple as assigning a different
    draw phase to the back plane because UiElements do not expect to be
    rendered and, in fact, assert that their Render function is never
    called.
    
    So I have instead created an InvisibleHitTarget base class for this
    sort of UiElement and I have updated UiSceneManagerTest to check draw
    phase when it is checking the visibility of elements.
    
    And this uncovered another issue - the exit prompt backplane was
    also hit testable, but not rendered and so I've also made it a hit
    target.
    
    We should go further than this, eventually, and update the hit
    testing code to operate on only those elements that render (this
    change would ensure that the backplanes show up in this set of
    elements). This is tracked in crbug.com/768079.
    
    Bug: 767883
    Change-Id: If4629cc449501e2e1b03fa20dc429e4198017df2
    Reviewed-on: https://chromium-review.googlesource.com/679794
    Commit-Queue: Ian Vollick <vollick@chromium.org>
    Reviewed-by: default avatarBiao She <bshe@chromium.org>
    Reviewed-by: default avatarChristopher Grant <cjgrant@chromium.org>
    Reviewed-by: default avatarYash Malik <ymalik@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#504133}
    f81cf54a
exit_prompt_backplane.h 957 Bytes