Attempt to fix #35057 and #35372: slow texture painting performance.
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Wed, 15 May 2013 14:37:05 +0000 (14:37 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Wed, 15 May 2013 14:37:05 +0000 (14:37 +0000)
commite1229b2978c37a043f3932657ac5cfa156093866
tree9b11c52390302485cf1b5be799d693e4fce03f22
parent71775dc2a49d8ec20d31544f2fccf69729a8cd39
Attempt to fix #35057 and #35372: slow texture painting performance.

After the paint refactoring for 2.67, the OpenGL texture was getting updated for
every stroke point, rather than once for every redraw. With a small brush radius
and low spacing the number of stroke points can be quite large, which might have
a big performance impact depending on the graphics card / drivers.

Also for 2D image paint, avoid redrawing the button panels and properties editor
during painting.

There is another possible cause for slowdowns with 3D texture painting which was
not fixed. Projection painting is creating and destroying threads for every stroke
point. Depending on the CPU/OS there might be a lot of overhead in doing that if
the brush size is small.
source/blender/editors/sculpt_paint/paint_image.c
source/blender/editors/sculpt_paint/paint_image_2d.c
source/blender/editors/sculpt_paint/paint_image_proj.c
source/blender/editors/sculpt_paint/paint_intern.h
source/blender/editors/sculpt_paint/paint_stroke.c
source/blender/editors/sculpt_paint/paint_vertex.c
source/blender/editors/sculpt_paint/sculpt.c
source/blender/editors/space_buttons/space_buttons.c
source/blender/editors/space_image/space_image.c
source/blender/windowmanager/WM_types.h