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

Side by Side Diff: remoting/codec/video_encoder_helper.cc

Issue 1827043004: Remove shaped desktop support from remoting host and client. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « remoting/codec/video_decoder_vpx.cc ('k') | remoting/codec/video_encoder_helper_unittest.cc » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/codec/video_encoder_helper.h" 5 #include "remoting/codec/video_encoder_helper.h"
6 6
7 #include "remoting/proto/video.pb.h" 7 #include "remoting/proto/video.pb.h"
8 #include "third_party/webrtc/modules/desktop_capture/desktop_frame.h" 8 #include "third_party/webrtc/modules/desktop_capture/desktop_frame.h"
9 #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h" 9 #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h"
10 #include "third_party/webrtc/modules/desktop_capture/desktop_region.h" 10 #include "third_party/webrtc/modules/desktop_capture/desktop_region.h"
(...skipping 26 matching lines...) Expand all
37 for (webrtc::DesktopRegion::Iterator iter(updated_region); 37 for (webrtc::DesktopRegion::Iterator iter(updated_region);
38 !iter.IsAtEnd(); iter.Advance()) { 38 !iter.IsAtEnd(); iter.Advance()) {
39 const webrtc::DesktopRect& rect = iter.rect(); 39 const webrtc::DesktopRect& rect = iter.rect();
40 Rect* dirty_rect = packet->add_dirty_rects(); 40 Rect* dirty_rect = packet->add_dirty_rects();
41 dirty_rect->set_x(rect.left()); 41 dirty_rect->set_x(rect.left());
42 dirty_rect->set_y(rect.top()); 42 dirty_rect->set_y(rect.top());
43 dirty_rect->set_width(rect.width()); 43 dirty_rect->set_width(rect.width());
44 dirty_rect->set_height(rect.height()); 44 dirty_rect->set_height(rect.height());
45 } 45 }
46 46
47 // Record the shape of the frame, if specified.
48 if (frame.shape()) {
49 packet->set_use_desktop_shape(true);
50 for (webrtc::DesktopRegion::Iterator r(*frame.shape());
51 !r.IsAtEnd(); r.Advance()) {
52 Rect* rect = packet->add_desktop_shape_rects();
53 rect->set_x(r.rect().left());
54 rect->set_y(r.rect().top());
55 rect->set_width(r.rect().width());
56 rect->set_height(r.rect().height());
57 }
58 }
59
60 // Store frame DPI. 47 // Store frame DPI.
61 if (!frame.dpi().is_zero()) { 48 if (!frame.dpi().is_zero()) {
62 packet->mutable_format()->set_x_dpi(frame.dpi().x()); 49 packet->mutable_format()->set_x_dpi(frame.dpi().x());
63 packet->mutable_format()->set_y_dpi(frame.dpi().y()); 50 packet->mutable_format()->set_y_dpi(frame.dpi().y());
64 } 51 }
65 52
66 return packet; 53 return packet;
67 } 54 }
68 55
69 } // namespace remoting 56 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/codec/video_decoder_vpx.cc ('k') | remoting/codec/video_encoder_helper_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698