Fix DCHECK for VR Browsing's gpu trace fence
This fence is used to measure render time in VR Browsing mode. Replacing the gpu_fence_ member after GVR Submit has a race condition - GVR internally creates a fence when submitting and blocks the next Submit until the previous submitted frame's fence is complete, but the separate render time fence was created after submitting, so we may end up with a situation where this second fence hasn't registered as complete yet. Update the order to create the new fence first in a locally scoped variable before GVR submit, then overwrite the previous fence only after GVR submit completes. BUG=854347 Change-Id: I8359f67859016039b2ddf5d54d5f391c5e212918 Reviewed-on: https://chromium-review.googlesource.com/1107013Reviewed-by:Bill Orr <billorr@chromium.org> Commit-Queue: Klaus Weidner <klausw@chromium.org> Cr-Commit-Position: refs/heads/master@{#568694}
Showing
Please register or sign in to comment