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

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

Issue 23440046: Remove dependency on Skia from chromoting client. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « remoting/host/DEPS ('k') | remoting/protocol/input_event_tracker.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/mouse_clamping_filter.h" 5 #include "remoting/host/mouse_clamping_filter.h"
6 6
7 #include "remoting/proto/event.pb.h" 7 #include "remoting/proto/event.pb.h"
8 #include "remoting/proto/video.pb.h" 8 #include "remoting/proto/video.pb.h"
9 9
10 namespace remoting { 10 namespace remoting {
11 11
12 MouseClampingFilter::MouseClampingFilter( 12 MouseClampingFilter::MouseClampingFilter(
13 protocol::InputStub* input_stub) 13 protocol::InputStub* input_stub)
14 : input_filter_(input_stub), 14 : input_filter_(input_stub),
15 video_stub_(NULL) { 15 video_stub_(NULL) {
16 } 16 }
17 17
18 MouseClampingFilter::~MouseClampingFilter() { 18 MouseClampingFilter::~MouseClampingFilter() {
19 } 19 }
20 20
21 void MouseClampingFilter::ProcessVideoPacket( 21 void MouseClampingFilter::ProcessVideoPacket(
22 scoped_ptr<VideoPacket> video_packet, 22 scoped_ptr<VideoPacket> video_packet,
23 const base::Closure& done) { 23 const base::Closure& done) {
24 // Configure the MouseInputFilter to clamp to the video dimensions. 24 // Configure the MouseInputFilter to clamp to the video dimensions.
25 if (video_packet->format().has_screen_width() && 25 if (video_packet->format().has_screen_width() &&
26 video_packet->format().has_screen_height()) { 26 video_packet->format().has_screen_height()) {
27 SkISize screen_size = SkISize::Make(video_packet->format().screen_width(), 27 webrtc::DesktopSize screen_size =
28 video_packet->format().screen_height()); 28 webrtc::DesktopSize(video_packet->format().screen_width(),
29 video_packet->format().screen_height());
29 input_filter_.set_input_size(screen_size); 30 input_filter_.set_input_size(screen_size);
30 input_filter_.set_output_size(screen_size); 31 input_filter_.set_output_size(screen_size);
31 } 32 }
32 33
33 video_stub_->ProcessVideoPacket(video_packet.Pass(), done); 34 video_stub_->ProcessVideoPacket(video_packet.Pass(), done);
34 } 35 }
35 36
36 } // namespace remoting 37 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/DEPS ('k') | remoting/protocol/input_event_tracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698