diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-05-15 18:37:05 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-05-15 18:37:05 +0400 |
commit | e1229b2978c37a043f3932657ac5cfa156093866 (patch) | |
tree | 9b11c52390302485cf1b5be799d693e4fce03f22 /source/blender/editors/space_image | |
parent | 71775dc2a49d8ec20d31544f2fccf69729a8cd39 (diff) |
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.
Diffstat (limited to 'source/blender/editors/space_image')
-rw-r--r-- | source/blender/editors/space_image/space_image.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c index 30564d52343..679c1632eb1 100644 --- a/source/blender/editors/space_image/space_image.c +++ b/source/blender/editors/space_image/space_image.c @@ -454,9 +454,11 @@ static void image_listener(ScrArea *sa, wmNotifier *wmn) break; case NC_IMAGE: if (wmn->reference == sima->image || !wmn->reference) { - image_scopes_tag_refresh(sa); - ED_area_tag_refresh(sa); - ED_area_tag_redraw(sa); + if (wmn->action != NA_PAINTING) { + image_scopes_tag_refresh(sa); + ED_area_tag_refresh(sa); + ED_area_tag_redraw(sa); + } } break; case NC_SPACE: @@ -737,6 +739,10 @@ static void image_main_area_listener(ARegion *ar, wmNotifier *wmn) if (wmn->action == NA_EDITED) ED_region_tag_redraw(ar); break; + case NC_IMAGE: + if (wmn->action == NA_PAINTING) + ED_region_tag_redraw(ar); + break; } } @@ -829,7 +835,8 @@ static void image_scope_area_listener(ARegion *ar, wmNotifier *wmn) } break; case NC_IMAGE: - ED_region_tag_redraw(ar); + if (wmn->action != NA_PAINTING) + ED_region_tag_redraw(ar); break; case NC_NODE: ED_region_tag_redraw(ar); |