[vte] widget: Move some methods to VteTerminalPrivate



commit da0d48350e28418d6c0fc4be2ecad87628c46f45
Author: Christian Persch <chpe gnome org>
Date:   Sun Jan 31 15:08:45 2016 +0100

    widget: Move some methods to VteTerminalPrivate

 src/vte.cc         |   18 ++++++++----------
 src/vteinternal.hh |    1 +
 2 files changed, 9 insertions(+), 10 deletions(-)
---
diff --git a/src/vte.cc b/src/vte.cc
index 6e32140..3867ce4 100644
--- a/src/vte.cc
+++ b/src/vte.cc
@@ -10606,16 +10606,14 @@ VteTerminalPrivate::emit_pending_signals()
         g_object_thaw_notify(object);
 }
 
-static void time_process_incoming (VteTerminal *terminal)
+void
+VteTerminalPrivate::time_process_incoming()
 {
-       gdouble elapsed;
-       glong target;
-       g_timer_reset (process_timer);
-       terminal->pvt->process_incoming();
-       elapsed = g_timer_elapsed (process_timer, NULL) * 1000;
-       target = VTE_MAX_PROCESS_TIME / elapsed * terminal->pvt->input_bytes;
-       terminal->pvt->max_input_bytes =
-               (terminal->pvt->max_input_bytes + target) / 2;
+       g_timer_reset(process_timer);
+       process_incoming();
+       auto elapsed = g_timer_elapsed(process_timer, NULL) * 1000;
+       gssize target = VTE_MAX_PROCESS_TIME / elapsed * m_input_bytes;
+       m_max_input_bytes = (m_max_input_bytes + target) / 2;
 }
 
 bool
@@ -10636,7 +10634,7 @@ VteTerminalPrivate::process(bool emit_adj_changed)
         is_active = _vte_incoming_chunks_length(m_incoming) != 0;
         if (is_active) {
                 if (VTE_MAX_PROCESS_TIME) {
-                        time_process_incoming(m_terminal);
+                        time_process_incoming();
                 } else {
                         process_incoming();
                 }
diff --git a/src/vteinternal.hh b/src/vteinternal.hh
index 7aa746f..15caf2d 100644
--- a/src/vteinternal.hh
+++ b/src/vteinternal.hh
@@ -594,6 +594,7 @@ public:
 
         void reset_update_rects();
         bool invalidate_dirty_rects_and_process_updates();
+        void time_process_incoming();
         void process_incoming();
         bool process(bool emit_adj_changed);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]