26 new_cache->
flag = flag;
27 new_cache->
index = index;
37 if (index_a == index_b) {
40 return index_a < index_b ? 1 : -1;
74 if (new_update_cache->
flag <= update_cache->
flag) {
79 update_cache->
data = new_update_cache->
data;
80 update_cache->
flag = new_update_cache->
flag;
106 if (gpl_index == -1) {
108 root_cache->
flag = node_flag;
116 const bool is_layer_update_node = (gpf_index == -1);
133 const bool is_frame_update_node = (gps_index == -1);
168 if (root_cache ==
NULL) {
@ GP_UPDATE_NODE_LIGHT_COPY
@ GP_UPDATE_NODE_FULL_COPY
bool(* GPencilUpdateCacheIter_Cb)(GPencilUpdateCache *cache, void *user_data)
DLRBT_Tree * BLI_dlrbTree_new(void)
DLRBT_Node * BLI_dlrbTree_add(DLRBT_Tree *tree, DLRBT_Comparator_FP cmp_cb, DLRBT_NAlloc_FP new_cb, DLRBT_NUpdate_FP update_cb, void *data)
void BLI_dlrbTree_linkedlist_sync(DLRBT_Tree *tree)
void BLI_dlrbTree_free(DLRBT_Tree *tree, DLRBT_NFree_FP free_cb)
BLI_INLINE bool BLI_listbase_is_empty(const struct ListBase *lb)
#define LISTBASE_FOREACH(type, var, list)
int BLI_findindex(const struct ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
Read Guarded memory(de)allocation.
static DLRBT_Node * cache_node_alloc(void *data)
void BKE_gpencil_tag_light_update(bGPdata *gpd, bGPDlayer *gpl, bGPDframe *gpf, bGPDstroke *gps)
static void gpencil_traverse_update_cache_ex(GPencilUpdateCache *parent_cache, GPencilUpdateCacheTraverseSettings *ts, int depth, void *user_data)
static void cache_node_free(void *node)
static void update_cache_node_create(bGPdata *gpd, bGPDlayer *gpl, bGPDframe *gpf, bGPDstroke *gps, bool full_copy)
GPencilUpdateCache * BKE_gpencil_create_update_cache(void *data, bool full_copy)
void BKE_gpencil_free_update_cache(bGPdata *gpd)
static void cache_node_update(void *node, void *data)
static void update_cache_node_create_ex(GPencilUpdateCache *root_cache, void *data, int gpl_index, int gpf_index, int gps_index, bool full_copy)
void BKE_gpencil_traverse_update_cache(GPencilUpdateCache *cache, GPencilUpdateCacheTraverseSettings *ts, void *user_data)
void BKE_gpencil_tag_full_update(bGPdata *gpd, bGPDlayer *gpl, bGPDframe *gpf, bGPDstroke *gps)
static short cache_node_compare(void *node, void *data)
static void update_cache_free(GPencilUpdateCache *cache)
static GPencilUpdateCache * update_cache_alloc(int index, int flag, void *data)
void(* MEM_freeN)(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
GPencilUpdateCache * cache
GPencilUpdateCacheIter_Cb update_cache_cb[3]
struct DLRBT_Tree * children
struct GPencilUpdateCache * update_cache