Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Parker <zanders3>2022-07-25 08:56:17 +0300
committerJeroen Bakker <jeroen@blender.org>2022-07-25 09:14:32 +0300
commit44258b5ad0737140d7d1026cc540e3f94ea05566 (patch)
treee84ca6efd3946df7397eec8f6e582a3cc76386bc /source/blender/editors/sculpt_paint/paint_image.cc
parent7808ee9bd73d7eb286d52ff5a28592dfffbccf40 (diff)
Undo: Improve image undo performance
When texture painting a lot of time is spent in ED_image_paint_tile_find. This fixes stores the PaintTiles in a blender::Map making ED_image_paint_tile_find an O(1) rather than O(n) operation. When using threading the locking should happen during read as well, still this gives a boost in performance as the read is now much faster. Reviewed By: jbakker Maniphest Tasks: T99546 Differential Revision: https://developer.blender.org/D15415
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_image.cc')
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image.cc b/source/blender/editors/sculpt_paint/paint_image.cc
index 6ed43fe6403..24290fed323 100644
--- a/source/blender/editors/sculpt_paint/paint_image.cc
+++ b/source/blender/editors/sculpt_paint/paint_image.cc
@@ -125,7 +125,7 @@ void ED_imapaint_dirty_region(
imapaint_region_tiles(ibuf, x, y, w, h, &tilex, &tiley, &tilew, &tileh);
- ListBase *undo_tiles = ED_image_paint_tile_list_get();
+ PaintTileMap *undo_tiles = ED_image_paint_tile_map_get();
for (ty = tiley; ty <= tileh; ty++) {
for (tx = tilex; tx <= tilew; tx++) {