Currently a paint step is evaluated one by one. Redoing multiple checks and calculations. In case those checks and calculations are similar we could improve performance by evaluating multiple paint steps in the painting kernel.
When sculpting this isn't possible as geometry is changing, but when only effecting colors or attributes this could improve performance.
Checks/calculations that would return the same result:
- Clipping tests: In order to do this we should split clipping tests from brush tests.
- Most texture evaluation
Would especially improve texture painting performance as most effort at this moment was done to reduce the calls to these tests.
A possible approach would be to collect the steps in a list, still evaluate them one by one. But brushes that can benefit would store the needed data in a list containing dynamic data per step.
When the paint frame finishes the brush will be triggered to do the actual evaluation.