Browse Source

cleanup missed PSTAT ifdefs for opt4

Cary Sandvig 24 years ago
parent
commit
cd03eb6042

+ 11 - 0
panda/src/glxdisplay/glxGraphicsWindow.cxx

@@ -14,7 +14,10 @@
 #include <keyboardButton.h>
 #include <mouseButton.h>
 #include <glGraphicsStateGuardian.h>
+#ifdef DO_PSTAT
 #include <pStatTimer.h>
+#endif /* DO_PSTAT */
+#include <clockObject.h>
 
 #include <errno.h>
 #include <sys/time.h>
@@ -661,7 +664,9 @@ void glxGraphicsWindow::end_frame( void )
   }
 
   {
+#ifdef DO_PSTAT
     PStatTimer timer(_swap_pcollector);
+#endif /* DO_PSTAT */
     glXSwapBuffers(_display, _xwindow);
   }
 
@@ -1274,8 +1279,10 @@ supports_update() const {
 ////////////////////////////////////////////////////////////////////
 void glxGraphicsWindow::update(void)
 {
+#ifdef DO_PSTAT
   _show_code_pcollector.stop();
   PStatClient::main_tick();
+#endif /* DO_PSTAT */
 
   if (_change_mask)
     handle_changes();
@@ -1289,7 +1296,9 @@ void glxGraphicsWindow::update(void)
     idle_wait();
   else
     process_events();
+#ifdef DO_PSTAT
   _show_code_pcollector.start();
+#endif /* DO_PSTAT */
 }
 
 ////////////////////////////////////////////////////////////////////
@@ -1377,7 +1386,9 @@ void glxGraphicsWindow::enable_mouse_entry(bool val)
 //  Description:
 ////////////////////////////////////////////////////////////////////
 void glxGraphicsWindow::make_current(void) {
+#ifdef DO_PSTAT
   PStatTimer timer(_make_current_pcollector);
+#endif /* DO_PSTAT */
   glXMakeCurrent(_display, _xwindow, _context);
 }
 

+ 2 - 0
panda/src/glxdisplay/glxGraphicsWindow.h

@@ -12,7 +12,9 @@
 #include <pandabase.h>
 
 #include <graphicsWindow.h>
+#ifdef DO_PSTATS
 #include <pStatCollector.h>
+#endif /* DO_PSTATS */
 
 #include <X11/Xlib.h>
 #include <GL/glx.h>