Fix a race in WebGL non-blocking readback implementation
Due to a race condition between OnSignalAck and CheckResultsAvailable, getSyncParameter or clientWaitSync can report that a WebGLSync has passed before the readback results are actually available to getBufferSubData. This results in getBufferSubData falling back to the slower path sometimes. To remedy this, this change switches from using SignalQuery to a custom callback mechanism managed by the individual QueryTracker Query object. This callback is called immediately when the Query discovers that it has completed. Bug: 873424 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 Change-Id: I2136e3ea4d55dc4b5c2392d24791b787500a30af Reviewed-on: https://chromium-review.googlesource.com/1171908Reviewed-by:Kenneth Russell <kbr@chromium.org> Commit-Queue: Kai Ninomiya <kainino@chromium.org> Cr-Commit-Position: refs/heads/master@{#582478}
Showing
Please register or sign in to comment