Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(68)

Unified Diff: remoting/host/client_connection.cc

Issue 3305001: Move decoder into separate thread, clean up API layering, and redo update protocl (Closed)
Patch Set: Fix compile error. Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/host/client_connection.h ('k') | remoting/host/event_executor_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/client_connection.cc
diff --git a/remoting/host/client_connection.cc b/remoting/host/client_connection.cc
index b6e875998c615856b40bd13e162720ff09a62096..2cbbed647499b91373fb40abb6ec9bfd0eb64d78 100644
--- a/remoting/host/client_connection.cc
+++ b/remoting/host/client_connection.cc
@@ -115,6 +115,18 @@ void ClientConnection::SendEndUpdateStreamMessage() {
update_stream_size_ = 0;
}
+void ClientConnection::MarkEndOfUpdate() {
+ // This is some logic to help calculate the average update stream size.
+ size_in_queue_ += update_stream_size_;
+ size_queue_.push_back(update_stream_size_);
+ if (size_queue_.size() > kAverageUpdateStream) {
+ size_in_queue_ -= size_queue_.front();
+ size_queue_.pop_front();
+ DCHECK_GE(size_in_queue_, 0);
+ }
+ update_stream_size_ = 0;
+}
+
int ClientConnection::GetPendingUpdateStreamMessages() {
DCHECK_EQ(loop_, MessageLoop::current());
« no previous file with comments | « remoting/host/client_connection.h ('k') | remoting/host/event_executor_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698