From e1229b2978c37a043f3932657ac5cfa156093866 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Wed, 15 May 2013 14:37:05 +0000 Subject: 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/space_buttons/space_buttons.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/space_buttons/space_buttons.c') diff --git a/source/blender/editors/space_buttons/space_buttons.c b/source/blender/editors/space_buttons/space_buttons.c index 34604f9d5f8..02b06e08eed 100644 --- a/source/blender/editors/space_buttons/space_buttons.c +++ b/source/blender/editors/space_buttons/space_buttons.c @@ -346,8 +346,10 @@ static void buttons_area_listener(ScrArea *sa, wmNotifier *wmn) break; case NC_TEXTURE: case NC_IMAGE: - ED_area_tag_redraw(sa); - sbuts->preview = 1; + if (wmn->action != NA_PAINTING) { + ED_area_tag_redraw(sa); + sbuts->preview = 1; + } break; case NC_SPACE: if (wmn->data == ND_SPACE_PROPERTIES) -- cgit v1.2.3