Commit: afbfa1352b778245cc2056e27598b905759f5709 Author: Joseph Eagar Date: Tue Jan 3 10:57:29 2023 -0800 Branches: temp-pbvh-split https://developer.blender.org/rBafbfa1352b778245cc2056e27598b905759f5709
temp-pbvh-split: make requested patch changes =================================================================== M source/blender/blenkernel/intern/pbvh_pixels.cc M source/blender/editors/sculpt_paint/sculpt_paint_image.cc =================================================================== diff --git a/source/blender/blenkernel/intern/pbvh_pixels.cc b/source/blender/blenkernel/intern/pbvh_pixels.cc index 084d30b271f..8af7cdf3eb4 100644 --- a/source/blender/blenkernel/intern/pbvh_pixels.cc +++ b/source/blender/blenkernel/intern/pbvh_pixels.cc @@ -24,8 +24,6 @@ #include "pbvh_intern.h" #include "pbvh_uv_islands.hh" -#include <atomic> - namespace blender::bke::pbvh::pixels { /** @@ -54,7 +52,7 @@ static float2 calc_barycentric_delta_x(const ImBuf *image_buffer, return calc_barycentric_delta(uvs, start_uv, end_uv); } -int count_node_pixels(PBVHNode &node) +static int count_node_pixels(PBVHNode &node) { if (!node.pixels.node_data) { return 0; @@ -806,13 +804,7 @@ using namespace blender::bke::pbvh::pixels; void BKE_pbvh_build_pixels(PBVH *pbvh, Mesh *mesh, Image *image, ImageUser *image_user) { if (update_pixels(pbvh, mesh, image, image_user)) { - double time_ms = PIL_check_seconds_timer(); - split_pixel_nodes(pbvh, mesh, image, image_user); - - time_ms = PIL_check_seconds_timer() - time_ms; - - printf("Nodes split time: %.2fms\n", time_ms * 1000.0); } } diff --git a/source/blender/editors/sculpt_paint/sculpt_paint_image.cc b/source/blender/editors/sculpt_paint/sculpt_paint_image.cc index 4b76ff7f0c8..b376ab2c480 100644 --- a/source/blender/editors/sculpt_paint/sculpt_paint_image.cc +++ b/source/blender/editors/sculpt_paint/sculpt_paint_image.cc @@ -13,7 +13,7 @@ #include "BLI_math_color_blend.h" #include "BLI_task.h" #ifdef DEBUG_PIXEL_NODES -# include "BLI_rand.h" +# include "BLI_hash.h" #endif #include "IMB_colormanagement.h" @@ -349,11 +349,11 @@ static void do_paint_pixels(void *__restrict userdata, float brush_color[4]; #ifdef DEBUG_PIXEL_NODES - RNG *rng = BLI_rng_new(POINTER_AS_UINT(node)); + uint hash = BLI_hash_int(POINTER_AS_UINT(node)); - brush_color[0] = BLI_rng_get_float(rng); - brush_color[1] = BLI_rng_get_float(rng); - brush_color[2] = BLI_rng_get_float(rng); + brush_color[0] = (float)(hash & 255) / 255.0f; + brush_color[1] = (float)((hash >> 8) & 255) / 255.0f; + brush_color[2] = (float)((hash >> 16) & 255) / 255.0f; #else copy_v3_v3(brush_color, ss->cache->invert ? BKE_brush_secondary_color_get(ss->scene, brush) : _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs