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:
authorAntonioya <blendergit@gmail.com>2018-10-19 21:39:21 +0300
committerAntonioya <blendergit@gmail.com>2018-10-20 10:08:34 +0300
commit541d07045b79cef52bdcf8bd1d90fc60793c9872 (patch)
treec8fcaaf79ce0d3a0cea526338e65d63a6de6048f /source/blender/makesdna/DNA_gpencil_types.h
parentb634bf9fb64930e0073c17bc115b6c3436b9a8e2 (diff)
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.
Diffstat (limited to 'source/blender/makesdna/DNA_gpencil_types.h')
-rw-r--r--source/blender/makesdna/DNA_gpencil_types.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/makesdna/DNA_gpencil_types.h b/source/blender/makesdna/DNA_gpencil_types.h
index 6223e456241..b420c595c6e 100644
--- a/source/blender/makesdna/DNA_gpencil_types.h
+++ b/source/blender/makesdna/DNA_gpencil_types.h
@@ -235,9 +235,11 @@ typedef enum eGPDframe_Flag {
/* Runtime temp data for bGPDlayer */
typedef struct bGPDlayer_Runtime {
- struct GHash *derived_data; /* runtime data created by modifiers */
+ struct bGPDframe *derived_array;/* runtime data created by modifiers */
int icon_id; /* id for dynamic icon used to show annotation color preview for layer */
int batch_index; /* batch used for dupli instances */
+ int len_derived; /* len of the derived array */
+ char pad_[4];
} bGPDlayer_Runtime;
/* Grease-Pencil Annotations - 'Layer' */
@@ -304,8 +306,6 @@ typedef enum eGPDlayer_OnionFlag {
/* Runtime temp data for bGPdata */
typedef struct bGPdata_Runtime {
- /* Drawing Manager cache */
- struct GHash *batch_cache_data;
void *sbuffer; /* stroke buffer (can hold GP_STROKE_BUFFER_MAX) */
/* GP Object drawing */