Commend timing prints for boolean

This commit is contained in:
2015-12-12 01:30:03 +11:00
parent fa32cde8a8
commit e301fcf8e7
2 changed files with 12 additions and 2 deletions

View File

@@ -32,6 +32,7 @@
* \ingroup modifiers
*/
// #ifdef DEBUG_TIME
#define USE_BMESH
#ifdef WITH_MOD_BOOLEAN
# define USE_CARVE WITH_MOD_BOOLEAN
@@ -61,8 +62,10 @@
#include "tools/bmesh_intersect.h"
#endif
#ifdef DEBUG_TIME
#include "PIL_time.h"
#include "PIL_time_utildefines.h"
#endif
static void copyData(ModifierData *md, ModifierData *target)
{
@@ -190,7 +193,9 @@ static DerivedMesh *applyModifier_bmesh(
BMesh *bm;
const BMAllocTemplate allocsize = BMALLOC_TEMPLATE_FROM_DM(dm, dm_other);
#ifdef DEBUG_TIME
TIMEIT_START(boolean_bmesh);
#endif
bm = BM_mesh_create(&allocsize);
DM_to_bmesh_ex(dm_other, bm, true);
@@ -271,7 +276,9 @@ static DerivedMesh *applyModifier_bmesh(
result->dirty |= DM_DIRTY_NORMALS;
#ifdef DEBUG_TIME
TIMEIT_END(boolean_bmesh);
#endif
return result;
}
@@ -315,12 +322,15 @@ static DerivedMesh *applyModifier_carve(
result = get_quick_derivedMesh(derivedData, dm, bmd->operation);
if (result == NULL) {
#ifdef DEBUG_TIME
TIMEIT_START(boolean_carve);
#endif
result = NewBooleanDerivedMesh(dm, bmd->object, derivedData, ob,
1 + bmd->operation);
#ifdef DEBUG_TIME
TIMEIT_END(boolean_carve);
#endif
}
/* if new mesh returned, return it; otherwise there was