diff options
author | Antonioya <blendergit@gmail.com> | 2019-07-23 10:46:29 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2019-07-23 10:46:29 +0300 |
commit | 2204bfcf9e1c3a38e60830bd97775dd72158f4d6 (patch) | |
tree | 4f9c827389a23a431f8771b4ca02f410860c0242 /source/blender/draw/engines/gpencil/gpencil_engine.c | |
parent | f64db794ee690f05905ace0a66d81d2e75549b90 (diff) | |
parent | 34ad6da4a06ef46cd19945f61cc5f968538546a8 (diff) |
Merge branch 'master' into temp-gpencil-drw-engine
Diffstat (limited to 'source/blender/draw/engines/gpencil/gpencil_engine.c')
-rw-r--r-- | source/blender/draw/engines/gpencil/gpencil_engine.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.c b/source/blender/draw/engines/gpencil/gpencil_engine.c index 646fb359836..408c9759682 100644 --- a/source/blender/draw/engines/gpencil/gpencil_engine.c +++ b/source/blender/draw/engines/gpencil/gpencil_engine.c @@ -789,8 +789,11 @@ static void gpencil_prepare_fast_drawing(GPENCIL_StorageList *stl, } } -static void gpencil_free_runtime_data(GPENCIL_StorageList *stl) +void DRW_gpencil_free_runtime_data(void *ved) { + GPENCIL_Data *vedata = (GPENCIL_Data *)ved; + GPENCIL_StorageList *stl = ((GPENCIL_Data *)vedata)->stl; + /* free gpu data */ DRW_TEXTURE_FREE_SAFE(stl->g_data->gpencil_blank_texture); @@ -976,8 +979,6 @@ void GPENCIL_draw_scene(void *ved) /* if the draw is for select, do a basic drawing and return */ if (DRW_state_is_select() || DRW_state_is_depth()) { drw_gpencil_select_render(stl, psl); - /* free memory */ - gpencil_free_runtime_data(stl); return; } @@ -1010,7 +1011,7 @@ void GPENCIL_draw_scene(void *ved) } /* free memory */ - gpencil_free_runtime_data(stl); + DRW_gpencil_free_runtime_data(ved); return; } @@ -1161,7 +1162,7 @@ void GPENCIL_draw_scene(void *ved) } } /* free memory */ - gpencil_free_runtime_data(stl); + DRW_gpencil_free_runtime_data(ved); /* reset */ if (DRW_state_is_fbo()) { |