diff --git a/panda/src/pgraph/nodePath.cxx b/panda/src/pgraph/nodePath.cxx index 9a35a7876d..ba11a1b34f 100644 --- a/panda/src/pgraph/nodePath.cxx +++ b/panda/src/pgraph/nodePath.cxx @@ -80,6 +80,8 @@ int NodePath::_max_search_depth = 7000; TypeHandle NodePath::_type_handle; +PStatCollector NodePath::_get_transform_pcollector("*:NodePath:get_transform"); +PStatCollector NodePath::_verify_complete_pcollector("*:NodePath:verify_complete"); #ifdef HAVE_PYTHON #include "py_panda.h" @@ -1097,7 +1099,6 @@ get_transform(Thread *current_thread) const { CPT(TransformState) NodePath:: get_transform(const NodePath &other, Thread *current_thread) const { nassertr(_error_type == ET_ok && other._error_type == ET_ok, TransformState::make_identity()); - static PStatCollector _get_transform_pcollector("*:NodePath:get_transform"); PStatTimer timer(_get_transform_pcollector); if (other.is_empty()) { @@ -6509,7 +6510,6 @@ verify_complete(Thread *current_thread) const { } #endif // HAVE_THREADS - static PStatCollector _verify_complete_pcollector("*:NodePath:verify_complete"); PStatTimer timer(_verify_complete_pcollector); const NodePathComponent *comp = _head; diff --git a/panda/src/pgraph/nodePath.h b/panda/src/pgraph/nodePath.h index 413fcb95b3..3a48baea0f 100644 --- a/panda/src/pgraph/nodePath.h +++ b/panda/src/pgraph/nodePath.h @@ -989,6 +989,9 @@ private: ErrorType _error_type; static int _max_search_depth; + static PStatCollector _get_transform_pcollector; + static PStatCollector _verify_complete_pcollector; + public: static TypeHandle get_class_type() { return _type_handle; diff --git a/panda/src/text/textNode.cxx b/panda/src/text/textNode.cxx index 673755a58b..aea9c3552d 100644 --- a/panda/src/text/textNode.cxx +++ b/panda/src/text/textNode.cxx @@ -52,7 +52,7 @@ TypeHandle TextNode::_type_handle; -static PStatCollector text_generate_collector("*:Generate Text"); +PStatCollector TextNode::_text_generate_pcollector("*:Generate Text"); //////////////////////////////////////////////////////////////////// // Function: TextNode::Constructor @@ -343,7 +343,7 @@ write(ostream &out, int indent_level) const { //////////////////////////////////////////////////////////////////// PT(PandaNode) TextNode:: generate() { - PStatTimer timer(text_generate_collector); + PStatTimer timer(_text_generate_pcollector); if (text_cat.is_debug()) { text_cat.debug() << "Rebuilding " << get_type() << " " << get_name() diff --git a/panda/src/text/textNode.h b/panda/src/text/textNode.h index 3cc4737a86..eef4a7c25e 100644 --- a/panda/src/text/textNode.h +++ b/panda/src/text/textNode.h @@ -322,6 +322,8 @@ private: int _num_rows; wstring _wordwrapped_wtext; + static PStatCollector _text_generate_pcollector; + public: static TypeHandle get_class_type() { return _type_handle;