• Christopher Grant's avatar
    VR: Fix text updates due to user input · 779dea58
    Christopher Grant authored
    The omnibox is a text element that updates according to user input.
    User input happens after element layout, and since the text texture
    heavily relies on layout, "dirtying" the text texture really means
    laying it out again.
    
    Prior to recent cleanup and refactoring, we mistakenly got away with
    this - a text element could resize itself after the layout stage and
    appear incorrectly.  Post-cleanup, the re-layout can't happen, but a new
    bug was introduced where a post-layout phase could dirty a texture, and
    the texture update phase would redraw and "clean" the texture without
    doing layout.  The broken layout would then persist indefinitely.
    
    To address the problem, elements may mark themselves as requiring
    measurement for texture draw.  These elements will not be redrawn unless
    their measurement step has happened.
    
    There was a measured() DCHECK mechanism previously, that was taken out
    because most textures no longer measure themselves.  This change
    reintroduces that check in it's new form.
    
    BUG=834297
    
    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;luci.chromium.try:win_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_vr
    Change-Id: Ib17315a5c053d487edfbf7b858c2e9541924c3a6
    Reviewed-on: https://chromium-review.googlesource.com/1016064Reviewed-by: default avatarIan Vollick <vollick@chromium.org>
    Commit-Queue: Christopher Grant <cjgrant@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#551714}
    779dea58
textured_element.h 1.87 KB