[Bf-blender-cvs] [81a5ed5ddb3] temp-T97352-3d-texturing-seam-bleeding-b2: Added timeit sections.

Jeroen Bakker noreply at git.blender.org
Mon Jul 4 14:24:09 CEST 2022


Commit: 81a5ed5ddb31c584c522d61dbf81fb5318ea05c4
Author: Jeroen Bakker
Date:   Mon Jul 4 14:06:37 2022 +0200
Branches: temp-T97352-3d-texturing-seam-bleeding-b2
https://developer.blender.org/rB81a5ed5ddb31c584c522d61dbf81fb5318ea05c4

Added timeit sections.

===================================================================

M	source/blender/blenkernel/BKE_uv_islands.hh

===================================================================

diff --git a/source/blender/blenkernel/BKE_uv_islands.hh b/source/blender/blenkernel/BKE_uv_islands.hh
index 432240fecf6..c866be32c62 100644
--- a/source/blender/blenkernel/BKE_uv_islands.hh
+++ b/source/blender/blenkernel/BKE_uv_islands.hh
@@ -16,6 +16,8 @@
 
 #include "DNA_meshdata_types.h"
 
+#include "PIL_time_utildefines.h"
+
 namespace blender::bke::uv_islands {
 // TODO: primitives can be added twice
 // TODO: Joining uv island should check where the borders could be merged.
@@ -134,6 +136,7 @@ struct MeshData {
         mloop(mloop),
         mloopuv(mloopuv)
   {
+    TIMEIT_START(init_mesh_data);
     init_vertices();
     init_primitives();
     init_edges();
@@ -153,6 +156,7 @@ struct MeshData {
       }
     }
 #endif
+    TIMEIT_END(init_mesh_data);
   }
   void init_vertices()
   {
@@ -751,6 +755,7 @@ struct UVIslands {
 
   explicit UVIslands(MeshData &mesh_data)
   {
+    TIMEIT_START(uv_islands);
     islands.reserve(1000);
 
 #ifdef DEBUG_SVG
@@ -769,10 +774,12 @@ struct UVIslands {
       add(primitive);
     }
 #endif
+    TIMEIT_END(uv_islands);
   }
 
   void extract_borders()
   {
+    TIMEIT_START(extract_borders);
     for (UVIsland &island : islands) {
       island.extract_borders();
     }
@@ -792,10 +799,12 @@ struct UVIslands {
     svg_footer(of);
     of.close();
 #endif
+    TIMEIT_END(extract_borders);
   }
 
   void extend_borders(const UVIslandsMask &islands_mask)
   {
+    TIMEIT_START(extend_borders);
 #ifdef VALIDATE
     printf("Extending borders\n");
     printf("=================\n");
@@ -821,6 +830,7 @@ struct UVIslands {
     svg_footer(of);
     of.close();
 #endif
+    TIMEIT_END(extend_borders);
   }
 
  private:



More information about the Bf-blender-cvs mailing list