Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/movieclip.c
| Show First 20 Lines • Show All 62 Lines • ▼ Show 20 Lines | |||||
| #include "IMB_imbuf_types.h" | #include "IMB_imbuf_types.h" | ||||
| #include "IMB_imbuf.h" | #include "IMB_imbuf.h" | ||||
| #include "IMB_moviecache.h" | #include "IMB_moviecache.h" | ||||
| #include "DEG_depsgraph.h" | #include "DEG_depsgraph.h" | ||||
| #include "DEG_depsgraph_query.h" | #include "DEG_depsgraph_query.h" | ||||
| #include "GPU_texture.h" | |||||
| #ifdef WITH_OPENEXR | #ifdef WITH_OPENEXR | ||||
| # include "intern/openexr/openexr_multi.h" | # include "intern/openexr/openexr_multi.h" | ||||
| #endif | #endif | ||||
| /*********************** movieclip buffer loaders *************************/ | /*********************** movieclip buffer loaders *************************/ | ||||
| static int sequence_guess_offset(const char *full_name, int head_len, unsigned short numlen) | static int sequence_guess_offset(const char *full_name, int head_len, unsigned short numlen) | ||||
| { | { | ||||
| ▲ Show 20 Lines • Show All 1,265 Lines • ▼ Show 20 Lines | if (clip->cache) { | ||||
| MEM_freeN(clip->cache); | MEM_freeN(clip->cache); | ||||
| clip->cache = NULL; | clip->cache = NULL; | ||||
| } | } | ||||
| if (clip->anim) { | if (clip->anim) { | ||||
| IMB_free_anim(clip->anim); | IMB_free_anim(clip->anim); | ||||
| clip->anim = NULL; | clip->anim = NULL; | ||||
| } | } | ||||
| MovieClip_RuntimeGPUTexture *tex; | |||||
| for (tex = clip->runtime.gputextures.first; tex ; tex=tex->next) { | |||||
| for (int i = 0; i < TEXTARGET_COUNT; i++) { | |||||
| if (tex->gputexture[i] != NULL) { | |||||
| GPU_texture_free(tex->gputexture[i]); | |||||
| tex->gputexture[i] = NULL; | |||||
| } | |||||
| } | |||||
| } | |||||
| BLI_freelistN(&clip->runtime.gputextures); | |||||
| } | } | ||||
| void BKE_movieclip_clear_cache(MovieClip *clip) | void BKE_movieclip_clear_cache(MovieClip *clip) | ||||
| { | { | ||||
| free_buffers(clip); | free_buffers(clip); | ||||
| } | } | ||||
| void BKE_movieclip_clear_proxy_cache(MovieClip *clip) | void BKE_movieclip_clear_proxy_cache(MovieClip *clip) | ||||
| ▲ Show 20 Lines • Show All 387 Lines • Show Last 20 Lines | |||||