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_proj.c
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_proj.c')
-rw-r--r--source/blender/editors/sculpt_paint/paint_image_proj.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c
index 50480b8aef0..9449cc6eb8d 100644
--- a/source/blender/editors/sculpt_paint/paint_image_proj.c
+++ b/source/blender/editors/sculpt_paint/paint_image_proj.c
@@ -1813,7 +1813,7 @@ static int project_paint_undo_subtiles(const TileInfo *tinf, int tx, int ty)
}
if (generate_tile) {
- ListBase *undo_tiles = ED_image_paint_tile_list_get();
+ struct PaintTileMap *undo_tiles = ED_image_paint_tile_map_get();
volatile void *undorect;
if (tinf->masked) {
undorect = ED_image_paint_tile_push(undo_tiles,