Commit 3ef06a9f8644bacd0ffdf17c8cdb3721b719396c

Jiawei Shao 2017-11-03T18:41:33

Skip hasMappedBuffer check in draw validations in WebGL contexts MapBufferRange, FlushMappedBufferRange, and UnmapBuffer entry points are removed from the WebGL 2.0 API[1], so we don't need to validate if a vertex array buffer or an index buffer is mapped or not in draw validations (ValidateDrawBase and ValidateDrawElementsCommon) in a WebGL context. According to profiling data, hasMappedBuffer weights over 1% (1.12%) CPU times in WebGL Acquarium benchmark (10K fishes, Intel HD630). With this patch, this hot spot has disappeared and no new hot spots are introduced. This optimization can also slightly improve FPS on WebGL benchmarks, or keep the same at least. [1] https://www.khronos.org/registry/webgl/specs/latest/2.0/#5.14 BUG=angleproject:1671 Change-Id: I96e770b19b691e81774cc8e0c1b66b65dcc3cc83 Reviewed-on: https://chromium-review.googlesource.com/753281 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>