[Bf-blender-cvs] [6469dcfe414] temp-T96710-pbvh-pixels: Added timings around update.

Jeroen Bakker noreply at git.blender.org
Mon Apr 11 09:40:17 CEST 2022


Commit: 6469dcfe414cc5ec48975cd27e105f905f4354c3
Author: Jeroen Bakker
Date:   Mon Apr 11 09:40:07 2022 +0200
Branches: temp-T96710-pbvh-pixels
https://developer.blender.org/rB6469dcfe414cc5ec48975cd27e105f905f4354c3

Added timings around update.

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

M	source/blender/blenkernel/intern/pbvh_pixels.cc
M	source/blender/editors/sculpt_paint/sculpt_image.cc

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

diff --git a/source/blender/blenkernel/intern/pbvh_pixels.cc b/source/blender/blenkernel/intern/pbvh_pixels.cc
index f8afbdbd6f9..84e6d5842e2 100644
--- a/source/blender/blenkernel/intern/pbvh_pixels.cc
+++ b/source/blender/blenkernel/intern/pbvh_pixels.cc
@@ -14,6 +14,8 @@
 #include "BLI_math.h"
 #include "BLI_task.h"
 
+#include "PIL_time_utildefines.h"
+
 #include "BKE_image_wrappers.hh"
 
 #include "bmesh.h"
@@ -368,6 +370,7 @@ static void update_pixels(PBVH *pbvh,
   if (!find_nodes_to_update(pbvh, nodes_to_update, visited_polygons)) {
     return;
   }
+  TIMEIT_START(update_pixels);
 
   MLoopUV *ldata_uv = static_cast<MLoopUV *>(CustomData_get_layer(ldata, CD_MLOOPUV));
   if (ldata_uv == nullptr) {
@@ -427,6 +430,7 @@ static void update_pixels(PBVH *pbvh,
            float(compressed_data_len) / num_pixels);
   }
 #endif
+  TIMEIT_END(update_pixels);
 }
 
 }  // namespace blender::bke::pbvh::pixels::extractor
diff --git a/source/blender/editors/sculpt_paint/sculpt_image.cc b/source/blender/editors/sculpt_paint/sculpt_image.cc
index 66df4c45e70..fb65b5d2196 100644
--- a/source/blender/editors/sculpt_paint/sculpt_image.cc
+++ b/source/blender/editors/sculpt_paint/sculpt_image.cc
@@ -10,9 +10,11 @@
 #include "WM_message.h"
 #include "WM_types.h"
 
+#include "ED_sculpt.h"
+
 extern "C" {
 
-static void sculpt_pbvh_do_msg_tag_rebuild_pixels(struct bContext *C,
+static void sculpt_pbvh_do_msg_tag_rebuild_pixels(bContext *C,
                                                   wmMsgSubscribeKey *UNUSED(msg_key),
                                                   wmMsgSubscribeValue *UNUSED(msg_val))
 {
@@ -27,7 +29,7 @@ static void sculpt_pbvh_do_msg_tag_rebuild_pixels(struct bContext *C,
   BKE_pbvh_mark_update_pixels(ss->pbvh);
 }
 
-void ED_sculpt_pbvh_message_subscribe(const struct wmRegionMessageSubscribeParams *params)
+void ED_sculpt_pbvh_message_subscribe(const wmRegionMessageSubscribeParams *params)
 {
   struct wmMsgBus *mbus = params->message_bus;



More information about the Bf-blender-cvs mailing list