Browse Source

pgraph: Remove recursive lock grab in `Light.set_color()`

Harmless, but unnecessary
rdb 3 years ago
parent
commit
8a48c3b711
2 changed files with 2 additions and 2 deletions
  1. 1 1
      panda/src/pgraph/light.I
  2. 1 1
      panda/src/pgraph/light.cxx

+ 1 - 1
panda/src/pgraph/light.I

@@ -71,8 +71,8 @@ INLINE void Light::
 set_color(const LColor &color) {
 set_color(const LColor &color) {
   CDWriter cdata(_cycler);
   CDWriter cdata(_cycler);
   cdata->_color = color;
   cdata->_color = color;
+  cdata->_viz_geom_stale = true;
   _has_color_temperature = false;
   _has_color_temperature = false;
-  mark_viz_stale();
 }
 }
 
 
 /**
 /**

+ 1 - 1
panda/src/pgraph/light.cxx

@@ -125,7 +125,7 @@ set_color_temperature(PN_stdfloat temperature) {
 
 
   CDWriter cdata(_cycler);
   CDWriter cdata(_cycler);
   cdata->_color = color;
   cdata->_color = color;
-  mark_viz_stale();
+  cdata->_viz_geom_stale = true;
 }
 }
 
 
 /**
 /**