This is the correct fix for T71403
This way, you can use brushes with a diameter of 1px or smaller. This
allows painting only one pixel at the same time while keeping the AA and
mask generation code correct. The AA code supports lines smaller than
one pixel, so you can also draw very thin lines.
I don't know if this has other implications in other areas of Blender.
This patch works in 2D texture paint and Sculpt Mode, but I'm not sure
if doing this is compatible with previously saved brushes or if it is
breaking things in other areas of the code.