Part of #118145. Performance after this change results in an 156% speedup. This is measured on the function `stroke_update_step` on a mesh with 24k verts across 20k instances of the function being timed. In absolute values, this represents a 0.09ms speedup, from 0.16ms to 0.25ms. For BMesh, the brush now takes mask values into consideration by averaging all of the vert mask values for a face. Co-authored-by: Hans Goudey <hans@blender.org> Pull Request: https://projects.blender.org/blender/blender/pulls/123811