Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/subsurf_ccg.c
| Show First 20 Lines • Show All 163 Lines • ▼ Show 20 Lines | static CCGSubSurf *_getSubSurf(CCGSubSurf *prevSS, int subdivLevels, | ||||
| if (flags & CCG_ALLOC_MASK) | if (flags & CCG_ALLOC_MASK) | ||||
| ifc.vertDataSize += sizeof(float); | ifc.vertDataSize += sizeof(float); | ||||
| ifc.simpleSubdiv = !!(flags & CCG_SIMPLE_SUBDIV); | ifc.simpleSubdiv = !!(flags & CCG_SIMPLE_SUBDIV); | ||||
| if (useArena) { | if (useArena) { | ||||
| CCGAllocatorIFC allocatorIFC; | CCGAllocatorIFC allocatorIFC; | ||||
| CCGAllocatorHDL allocator = BLI_memarena_new(MEM_SIZE_OPTIMAL(1 << 16), "subsurf arena"); | CCGAllocatorHDL allocator = BLI_memarena_new(MEM_SIZE_OPTIMAL(1 << 16), "subsurf arena"); | ||||
| BLI_memarena_set_threadsafe((MemArena *)allocator); | |||||
| allocatorIFC.alloc = arena_alloc; | allocatorIFC.alloc = arena_alloc; | ||||
| allocatorIFC.realloc = arena_realloc; | allocatorIFC.realloc = arena_realloc; | ||||
| allocatorIFC.free = arena_free; | allocatorIFC.free = arena_free; | ||||
| allocatorIFC.release = arena_release; | allocatorIFC.release = arena_release; | ||||
| ccgSS = ccgSubSurf_new(&ifc, subdivLevels, &allocatorIFC, allocator); | ccgSS = ccgSubSurf_new(&ifc, subdivLevels, &allocatorIFC, allocator); | ||||
| } | } | ||||
| else { | else { | ||||
| ▲ Show 20 Lines • Show All 3,865 Lines • Show Last 20 Lines | |||||