Optimize GLES2Util::ComputeDataSize using templates.
Use templates to determine the size of each element and the elements per unit allowing ComputeDataSize to only use a single inlined CheckedNumeric multiply with a compile-time constant. The data size validation of glUniform calls was up to 12% of the GPU process' CPU time on some WebGL applications, this lowers it to be less than 0.1%. Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel Change-Id: Ic6e5f975087308da9473918a9ef081c0b591fbb4 Reviewed-on: https://chromium-review.googlesource.com/559104Reviewed-by:Antoine Labour <piman@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org> Cr-Commit-Position: refs/heads/master@{#485297}
Showing
This diff is collapsed.
This diff is collapsed.
Please register or sign in to comment