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:
authorJeroen Bakker <jbakker>2022-03-07 10:43:37 +0300
committerJeroen Bakker <jeroen@blender.org>2022-03-07 10:43:50 +0300
commit073d2390f0b8d37a5f02309ac1dcaf7618d7a4f9 (patch)
treee578a8e798022b67fba81ead7c5b0a4d719cc67f
parent4681987d92c7de644fd3abddb726fa2300b59486 (diff)
Fix T96163: Image editor doesn't refresh when undo/redo.
Undo would invalidate image owned GPU textures only. Textures that are owned by the editor were not refreshed. This patch would invalidate all the GPU textures by marking the whole image dirty. This can be improved later as we could add partial updates of GPU textures. Reviewed By: mont29 Maniphest Tasks: T96163 Differential Revision: https://developer.blender.org/D14259
-rw-r--r--source/blender/editors/space_image/image_undo.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/space_image/image_undo.c b/source/blender/editors/space_image/image_undo.c
index e81f3b6a490..9bfcf48ecd9 100644
--- a/source/blender/editors/space_image/image_undo.c
+++ b/source/blender/editors/space_image/image_undo.c
@@ -570,7 +570,8 @@ static void uhandle_restore_list(ListBase *undo_handles, bool use_init)
if (changed) {
BKE_image_mark_dirty(image, ibuf);
- BKE_image_free_gputextures(image); /* force OpenGL reload */
+ /* TODO(jbakker): only mark areas that are actually updated to improve performance. */
+ BKE_image_partial_update_mark_full_update(image);
if (ibuf->rect_float) {
ibuf->userflags |= IB_RECT_INVALID; /* force recreate of char rect */