From 0cda3c165a5aa427fdf3ba4a9ce5d7e469b3281f Mon Sep 17 00:00:00 2001 From: David Rose Date: Wed, 26 Mar 2008 00:05:51 +0000 Subject: [PATCH] time munge::geom --- panda/src/pgraph/cullableObject.cxx | 4 +++- panda/src/pgraph/cullableObject.h | 1 + panda/src/pstatclient/pStatProperties.cxx | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/panda/src/pgraph/cullableObject.cxx b/panda/src/pgraph/cullableObject.cxx index 9e3c7e8095..6670e98c0c 100644 --- a/panda/src/pgraph/cullableObject.cxx +++ b/panda/src/pgraph/cullableObject.cxx @@ -37,6 +37,7 @@ CullableObject::FormatMap CullableObject::_format_map; +PStatCollector CullableObject::_munge_geom_pcollector("*:Munge:Geom"); PStatCollector CullableObject::_munge_sprites_pcollector("*:Munge:Sprites"); PStatCollector CullableObject::_munge_sprites_verts_pcollector("*:Munge:Sprites:Verts"); PStatCollector CullableObject::_munge_sprites_prims_pcollector("*:Munge:Sprites:Prims"); @@ -61,6 +62,7 @@ munge_geom(GraphicsStateGuardianBase *gsg, GeomMunger *munger, const CullTraverser *traverser, bool force) { Thread *current_thread = traverser->get_current_thread(); + PStatTimer timer(_munge_geom_pcollector, current_thread); if (_geom != (Geom *)NULL) { _munger = munger; @@ -127,7 +129,7 @@ munge_geom(GraphicsStateGuardianBase *gsg, if (!munger->munge_geom(_geom, _munged_data, force, current_thread)) { return false; } - + StateMunger *state_munger; DCAST_INTO_R(state_munger, munger, false); _state = state_munger->munge_state(_state); diff --git a/panda/src/pgraph/cullableObject.h b/panda/src/pgraph/cullableObject.h index c47be640c3..8b08e1c080 100644 --- a/panda/src/pgraph/cullableObject.h +++ b/panda/src/pgraph/cullableObject.h @@ -113,6 +113,7 @@ private: typedef pmap FormatMap; static FormatMap _format_map; + static PStatCollector _munge_geom_pcollector; static PStatCollector _munge_sprites_pcollector; static PStatCollector _munge_sprites_verts_pcollector; static PStatCollector _munge_sprites_prims_pcollector; diff --git a/panda/src/pstatclient/pStatProperties.cxx b/panda/src/pstatclient/pStatProperties.cxx index d57da6ad4a..d44390d649 100644 --- a/panda/src/pstatclient/pStatProperties.cxx +++ b/panda/src/pstatclient/pStatProperties.cxx @@ -134,6 +134,7 @@ static TimeCollectorProperties time_properties[] = { { 1, "Cull:Sort", { 0.3, 0.3, 0.6 } }, { 1, "*:Show fps", { 0.5, 0.8, 1.0 } }, { 0, "*:Munge", { 0.3, 0.3, 0.9 } }, + { 1, "*:Munge:Geom", { 0.4, 0.2, 0.8 } }, { 1, "*:Munge:Sprites", { 0.2, 0.8, 0.4 } }, { 0, "*:Munge:Data", { 0.7, 0.5, 0.2 } }, { 0, "*:Munge:Rotate", { 0.9, 0.8, 0.5 } },