VR: Draw the reticle after planar chidren of the hit element.
To properly render the reticle, it needs to be drawn on the element it is hitting, rather than last in the scene (otherwise, translucent un-hittable elements may appear to have the reticle instead). In the future, we may transition to drawing the reticle last, always, for simplicity. However, if we don't do that, we need a way to have the reticle appear properly on top of composite UI elements - elements made up of sub-elements in a plane. Without this change, something like a button backplane may have the reticle, but portions of the reticle may appear under a different button foreground element even though it's on the same plane. With this change, we traverse the hit element's subtree, and draw the reticle after the last planar, visible child instead. This way, it's guaranteed to render on top of the composed element, unless the element has hittable children floating in front. BUG= R=mthiesse, vollick Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel Change-Id: I33a1aef392901b74e3b5814338a4e4c5fb58eac9 Reviewed-on: https://chromium-review.googlesource.com/791151 Commit-Queue: Christopher Grant <cjgrant@chromium.org> Reviewed-by:Biao She <bshe@chromium.org> Reviewed-by:
Ian Vollick <vollick@chromium.org> Cr-Commit-Position: refs/heads/master@{#519720}
Showing
Please register or sign in to comment