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

Side by Side Diff: remoting/host/video_scheduler.cc

Issue 833693002: Hide the cursor on the client when it is hidden on the host (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address Sergey's feedback Created 5 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "remoting/host/video_scheduler.h" 5 #include "remoting/host/video_scheduler.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 if (!capturer_) 115 if (!capturer_)
116 return; 116 return;
117 117
118 scoped_ptr<protocol::CursorShapeInfo> cursor_proto( 118 scoped_ptr<protocol::CursorShapeInfo> cursor_proto(
119 new protocol::CursorShapeInfo()); 119 new protocol::CursorShapeInfo());
120 cursor_proto->set_width(cursor->image()->size().width()); 120 cursor_proto->set_width(cursor->image()->size().width());
121 cursor_proto->set_height(cursor->image()->size().height()); 121 cursor_proto->set_height(cursor->image()->size().height());
122 cursor_proto->set_hotspot_x(cursor->hotspot().x()); 122 cursor_proto->set_hotspot_x(cursor->hotspot().x());
123 cursor_proto->set_hotspot_y(cursor->hotspot().y()); 123 cursor_proto->set_hotspot_y(cursor->hotspot().y());
124 124
125 std::string data; 125 cursor_proto->set_data(std::string());
126 uint8_t* current_row = cursor->image()->data(); 126 uint8_t* current_row = cursor->image()->data();
127 for (int y = 0; y < cursor->image()->size().height(); ++y) { 127 for (int y = 0; y < cursor->image()->size().height(); ++y) {
128 cursor_proto->mutable_data()->append( 128 cursor_proto->mutable_data()->append(
129 current_row, 129 current_row,
130 current_row + cursor->image()->size().width() * 130 current_row + cursor->image()->size().width() *
131 webrtc::DesktopFrame::kBytesPerPixel); 131 webrtc::DesktopFrame::kBytesPerPixel);
132 current_row += cursor->image()->stride(); 132 current_row += cursor->image()->stride();
133 } 133 }
134 134
135 network_task_runner_->PostTask( 135 network_task_runner_->PostTask(
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 frame.reset(); 398 frame.reset();
399 399
400 scheduler_.RecordEncodeTime( 400 scheduler_.RecordEncodeTime(
401 base::TimeDelta::FromMilliseconds(packet->encode_time_ms())); 401 base::TimeDelta::FromMilliseconds(packet->encode_time_ms()));
402 network_task_runner_->PostTask( 402 network_task_runner_->PostTask(
403 FROM_HERE, base::Bind(&VideoScheduler::SendVideoPacket, this, 403 FROM_HERE, base::Bind(&VideoScheduler::SendVideoPacket, this,
404 base::Passed(&packet))); 404 base::Passed(&packet)));
405 } 405 }
406 406
407 } // namespace remoting 407 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/chromeos/mouse_cursor_monitor_aura.cc ('k') | remoting/protocol/client_control_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698