Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/image.c
| Show First 20 Lines • Show All 354 Lines • ▼ Show 20 Lines | void BKE_image_free_buffers_ex(Image *ima, bool do_lock) | ||||
| image_free_anims(ima); | image_free_anims(ima); | ||||
| if (ima->rr) { | if (ima->rr) { | ||||
| RE_FreeRenderResult(ima->rr); | RE_FreeRenderResult(ima->rr); | ||||
| ima->rr = NULL; | ima->rr = NULL; | ||||
| } | } | ||||
| if (!G.background) { | |||||
| /* Background mode doesn't use OpenGL, | |||||
| * so we can avoid freeing GPU images and save some | |||||
| * time by skipping mutex lock. | |||||
| */ | |||||
| GPU_free_image(ima); | GPU_free_image(ima); | ||||
| } | |||||
| LISTBASE_FOREACH (ImageTile *, tile, &ima->tiles) { | LISTBASE_FOREACH (ImageTile *, tile, &ima->tiles) { | ||||
| tile->ok = IMA_OK; | tile->ok = IMA_OK; | ||||
| } | } | ||||
| if (do_lock) { | if (do_lock) { | ||||
| BLI_mutex_unlock(image_mutex); | BLI_mutex_unlock(image_mutex); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 5,450 Lines • Show Last 20 Lines | |||||