Browse Source

fix unfortunate naming of MouseAndKeyboard node

David Rose 17 years ago
parent
commit
cc8530f8a9

+ 0 - 121
panda/src/display/lru.cxx

@@ -689,127 +689,6 @@ void Lru::update_lru_page (LruPage *lru_page)
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void Lru::update_lru_page_old (LruPage *lru_page)
 void Lru::update_lru_page_old (LruPage *lru_page)
 {
 {
-
-#if LRU_UNIT_TEST
-  if(false) {
-    char  string[256];
-
-    sprintf(string, "  UPDATE %d\n", lru_page->_m.identifier);
-    OutputDebugString(string);
-  }
-#endif
-
-  if(lru_page->_m.v.lock == false) {
-    int  delta_priority;
-
-    delta_priority = 0;
-    if(false && lru_page->_m.total_usage > 0) {
-      int lifetime_frames;
-
-      lifetime_frames = this->_m.current_frame_identifier -
-        lru_page->_m.first_frame_identifier;
-      if(lifetime_frames >= 10) {
-        float one_over_update_frames;
-
-        if(lru_page->_m.update_frame_identifier) {
-          int target_priority;
-          int integer_update_frames;
-          float update_frames;
-          float update_average_frame_utilization;
-          float average_frame_bandwidth_utilization;
-
-          integer_update_frames = (this->_m.current_frame_identifier -
-            lru_page->_m.update_frame_identifier);
-          if(integer_update_frames > 0) {
-            update_frames = ( float ) integer_update_frames;
-            one_over_update_frames = 1.0f / update_frames;
-
-            update_average_frame_utilization =
-              (float) (lru_page->_m.update_total_usage) *
-              one_over_update_frames;
-
-            lru_page->_m.average_frame_utilization =
-              calculate_exponential_moving_average (
-                 update_average_frame_utilization, this->_m.weight,
-                 lru_page->_m.average_frame_utilization);
-
-            average_frame_bandwidth_utilization =
-              lru_page->_m.average_frame_utilization *
-              lru_page->_m.size;
-
-            target_priority = (int) (average_frame_bandwidth_utilization *
-              this->_m.frame_bandwidth_factor);
-
-            target_priority = (LPP_TotalPriorities - 1) - target_priority;
-            if(target_priority < 0) {
-              target_priority = 0;
-            }
-            if(target_priority >= LPP_TotalPriorities) {
-              target_priority = LPP_TotalPriorities - 1;
-            }
-
-            delta_priority = target_priority - lru_page->_m.priority;
-            lru_page->change_priority(delta_priority);
-          }
-        }
-
-        lru_page->_m.update_frame_identifier =
-          this->_m.current_frame_identifier;
-
-        lru_page->_m.update_total_usage = 0;
-      }
-    }
-
-    if(delta_priority == 0) {
-      if(this->_m.current_frame_identifier
-        == lru_page->_m.current_frame_identifier) {
-        // page used during this frame twice or more =>
-        // increase priority
-        if(lru_page->_m.current_frame_usage >= 2) {
-          if(lru_page->_m.priority >= LPP_High) {
-            lru_page->change_priority(-2);
-          }
-        }
-
-        if(lru_page->_m.total_frame_page_faults >= 1) {
-          // multiple page faults this frame => increase priority
-          if(lru_page->_m.total_frame_page_faults >= 2) {
-            if(lru_page->_m.priority >= LPP_High) {
-              lru_page->change_priority(-2);
-            }
-          }
-          else {
-            // single page faults this frame => increase priority
-            if(lru_page->_m.priority >= LPP_High) {
-              lru_page->change_priority(-1);
-            }
-          }
-        }
-      }
-      else {
-        // page not used this frame
-        int  last_access_delta;
-
-        last_access_delta
-        = this->_m.current_frame_identifier
-          - lru_page->_m.current_frame_identifier;
-        if(last_access_delta > 1) {
-          if(lru_page->_m.priority < LPP_Low) {
-            lru_page->change_priority(+1);
-          }
-        }
-      }
-    }
-
-    if(lru_page->_m.priority_change) {
-      if(this->_m.total_lru_page_priority_changes
-         < FRAME_MAXIMUM_PRIORITY_CHANGES) {
-        this->_m.lru_page_priority_change_array
-          [this->_m.total_lru_page_priority_changes]= lru_page;
-        this->_m.total_lru_page_priority_changes++;
-      }
-    }
-  }
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////

+ 1 - 1
panda/src/glxdisplay/glxGraphicsWindow.cxx

@@ -75,7 +75,7 @@ glxGraphicsWindow(GraphicsPipe *pipe,
   _net_wm_state_remove = glx_pipe->_net_wm_state_remove;
   _net_wm_state_remove = glx_pipe->_net_wm_state_remove;
 
 
   GraphicsWindowInputDevice device =
   GraphicsWindowInputDevice device =
-    GraphicsWindowInputDevice::pointer_and_keyboard(this, "keyboard/mouse");
+    GraphicsWindowInputDevice::pointer_and_keyboard(this, "keyboard_mouse");
   add_input_device(device);
   add_input_device(device);
 }
 }
 
 

+ 1 - 1
panda/src/tinydisplay/tinySDLGraphicsWindow.cxx

@@ -47,7 +47,7 @@ TinySDLGraphicsWindow(GraphicsPipe *pipe,
   update_pixel_factor();
   update_pixel_factor();
 
 
   GraphicsWindowInputDevice device =
   GraphicsWindowInputDevice device =
-    GraphicsWindowInputDevice::pointer_and_keyboard(this, "keyboard/mouse");
+    GraphicsWindowInputDevice::pointer_and_keyboard(this, "keyboard_mouse");
   add_input_device(device);
   add_input_device(device);
 }
 }
 
 

+ 1 - 1
panda/src/tinydisplay/tinyXGraphicsWindow.cxx

@@ -83,7 +83,7 @@ TinyXGraphicsWindow(GraphicsPipe *pipe,
   update_pixel_factor();
   update_pixel_factor();
 
 
   GraphicsWindowInputDevice device =
   GraphicsWindowInputDevice device =
-    GraphicsWindowInputDevice::pointer_and_keyboard(this, "keyboard/mouse");
+    GraphicsWindowInputDevice::pointer_and_keyboard(this, "keyboard_mouse");
   add_input_device(device);
   add_input_device(device);
 }
 }
 
 

+ 1 - 1
panda/src/windisplay/winGraphicsWindow.cxx

@@ -464,7 +464,7 @@ initialize_input_devices() {
   // Clear the handle array, and set up the system keyboard/mouse
   // Clear the handle array, and set up the system keyboard/mouse
   memset(_input_device_handle, 0, sizeof(_input_device_handle));
   memset(_input_device_handle, 0, sizeof(_input_device_handle));
   GraphicsWindowInputDevice device =
   GraphicsWindowInputDevice device =
-    GraphicsWindowInputDevice::pointer_and_keyboard(this, "keyboard/mouse");
+    GraphicsWindowInputDevice::pointer_and_keyboard(this, "keyboard_mouse");
   add_input_device(device);
   add_input_device(device);
   
   
   // Try initializing the Raw Input function pointers.
   // Try initializing the Raw Input function pointers.