Add ClientWaitWithTimeout to GLFenceEGL, use for WebVR
Currently, GLFenceEGL's ClientWait always uses EGL_FOREVER_KHR. This change adds a way to specify a timeout so that a thread can yield to do other work while waiting. This is being used in the critical path for WebVR rendering, and even a 1ms delay noticeably cuts into the 16ms frame time budget. The workaround was to repeatedly poll checking for completion, but that needs a very aggressive timeout to avoid unnecessary delay. Using a timeout is more efficient. Bug: 726026 Change-Id: I4c4292f31cf472e538cfdf18a835d48226d6ac58 Reviewed-on: https://chromium-review.googlesource.com/572663Reviewed-by:Kenneth Russell <kbr@chromium.org> Reviewed-by:
Michael Thiessen <mthiesse@chromium.org> Commit-Queue: Klaus Weidner <klausw@chromium.org> Cr-Commit-Position: refs/heads/master@{#487159}
Showing
Please register or sign in to comment