diff options
author | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2020-10-08 07:41:33 +0300 |
---|---|---|
committer | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2020-10-08 07:41:33 +0300 |
commit | d37fccab2632cabb398038820e7a549deaa7b937 (patch) | |
tree | 7d2f2941e6e22919beb137446e378e524750db7f /intern | |
parent | 0b4aeffda95dd991e1fb8e5d22e552a9f165f442 (diff) |
Cycles: fix UpdateTimeStats::clear() not resetting total times to zero
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/render/stats.cpp | 28 | ||||
-rw-r--r-- | intern/cycles/render/stats.h | 6 |
2 files changed, 20 insertions, 14 deletions
diff --git a/intern/cycles/render/stats.cpp b/intern/cycles/render/stats.cpp index e5600bad904..1a840a906a5 100644 --- a/intern/cycles/render/stats.cpp +++ b/intern/cycles/render/stats.cpp @@ -380,20 +380,20 @@ string SceneUpdateStats::full_report() void SceneUpdateStats::clear() { - geometry.times.entries.clear(); - image.times.entries.clear(); - light.times.entries.clear(); - object.times.entries.clear(); - background.times.entries.clear(); - bake.times.entries.clear(); - camera.times.entries.clear(); - film.times.entries.clear(); - integrator.times.entries.clear(); - osl.times.entries.clear(); - particles.times.entries.clear(); - scene.times.entries.clear(); - svm.times.entries.clear(); - tables.times.entries.clear(); + geometry.times.clear(); + image.times.clear(); + light.times.clear(); + object.times.clear(); + background.times.clear(); + bake.times.clear(); + camera.times.clear(); + film.times.clear(); + integrator.times.clear(); + osl.times.clear(); + particles.times.clear(); + scene.times.clear(); + svm.times.clear(); + tables.times.clear(); } CCL_NAMESPACE_END diff --git a/intern/cycles/render/stats.h b/intern/cycles/render/stats.h index 5dca6dd0b01..a6be27db4c2 100644 --- a/intern/cycles/render/stats.h +++ b/intern/cycles/render/stats.h @@ -94,6 +94,12 @@ class NamedTimeStats { * makes sure all accumulating values are properly updated. */ vector<NamedTimeEntry> entries; + + void clear() + { + total_time = 0.0; + entries.clear(); + } }; class NamedNestedSampleStats { |