Blender Git Loki
Git Commits -> Revision c2aefb8
Revision c2aefb8 by Antonio Vazquez (greasepencil-experimental, greasepencil-object, greasepencil-refactor, soc-2019-npr, temp-gpencil-eval) October 19, 2018, 09:35 (GMT) |
GP: Redesign drawing cache to support particles Full redesign of the cache system used for drawing strokes and handle derived frame data. Before, the cache was saved in bGPdata and a hash was used to manage several objects with the same datablock. Old design made the use of particles very inefficient and prone to bugs and segment faults, and especially when this was mixed with onion skinning and multiple objects using same datablock. Also, there were some conflicts with the depsgrah logic (the old design was done before despgraph was in place) that made the use of hash not working. The new design saves the data in the object runtime struct and avoid the use of any hash to find the right data. This improves the speed and reduce a lot the complexity of the code, memory allocation, hash overload and adds full support for particles and reused datablocks. The particles can reuse the modifiers and shader effects of the original grease pencil object. |
Commit Details:
Full Hash: c2aefb8ea4f97f5cbc182d343adb3f8e93f726c3
Parent Commit: e96f7ab
Lines Changed: +163, -147
11 Modified Paths:
/source/blender/blenkernel/intern/gpencil.c (+9, -30) (Diff)
/source/blender/blenkernel/intern/object.c (+3, -4) (Diff)
/source/blender/blenloader/intern/readfile.c (+2, -4) (Diff)
/source/blender/draw/DRW_engine.h (+1, -0) (Diff)
/source/blender/draw/engines/gpencil/gpencil_cache_utils.c (+89, -66) (Diff)
/source/blender/draw/engines/gpencil/gpencil_draw_utils.c (+46, -35) (Diff)
/source/blender/draw/engines/gpencil/gpencil_engine.h (+3, -2) (Diff)
/source/blender/editors/gpencil/gpencil_data.c (+2, -1) (Diff)
/source/blender/makesdna/DNA_gpencil_types.h (+3, -3) (Diff)
/source/blender/makesdna/DNA_object_types.h (+4, -1) (Diff)
/source/blender/makesrna/intern/rna_shader_fx.c (+1, -1) (Diff)
/source/blender/blenkernel/intern/object.c (+3, -4) (Diff)
/source/blender/blenloader/intern/readfile.c (+2, -4) (Diff)
/source/blender/draw/DRW_engine.h (+1, -0) (Diff)
/source/blender/draw/engines/gpencil/gpencil_cache_utils.c (+89, -66) (Diff)
/source/blender/draw/engines/gpencil/gpencil_draw_utils.c (+46, -35) (Diff)
/source/blender/draw/engines/gpencil/gpencil_engine.h (+3, -2) (Diff)
/source/blender/editors/gpencil/gpencil_data.c (+2, -1) (Diff)
/source/blender/makesdna/DNA_gpencil_types.h (+3, -3) (Diff)
/source/blender/makesdna/DNA_object_types.h (+4, -1) (Diff)
/source/blender/makesrna/intern/rna_shader_fx.c (+1, -1) (Diff)