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

Side by Side Diff: remoting/host/shaped_desktop_capturer.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, 9 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "remoting/host/shaped_desktop_capturer.h"
6
7 #include <utility>
8
9 #include "base/logging.h"
10 #include "remoting/host/desktop_shape_tracker.h"
11 #include "third_party/webrtc/modules/desktop_capture/desktop_frame.h"
12
13 namespace remoting {
14
15 ShapedDesktopCapturer::ShapedDesktopCapturer(
16 scoped_ptr<webrtc::DesktopCapturer> desktop_capturer,
17 scoped_ptr<DesktopShapeTracker> shape_tracker)
18 : desktop_capturer_(std::move(desktop_capturer)),
19 shape_tracker_(std::move(shape_tracker)),
20 callback_(nullptr) {}
21
22 ShapedDesktopCapturer::~ShapedDesktopCapturer() {}
23
24 void ShapedDesktopCapturer::Start(webrtc::DesktopCapturer::Callback* callback) {
25 callback_ = callback;
26 desktop_capturer_->Start(this);
27 }
28
29 void ShapedDesktopCapturer::Capture(const webrtc::DesktopRegion& region) {
30 desktop_capturer_->Capture(region);
31 }
32
33 void ShapedDesktopCapturer::SetSharedMemoryFactory(
34 rtc::scoped_ptr<webrtc::SharedMemoryFactory> shared_memory_factory) {
35 desktop_capturer_->SetSharedMemoryFactory(std::move(shared_memory_factory));
36 }
37
38 void ShapedDesktopCapturer::OnCaptureCompleted(webrtc::DesktopFrame* frame) {
39 shape_tracker_->RefreshDesktopShape();
40 frame->set_shape(new webrtc::DesktopRegion(shape_tracker_->desktop_shape()));
41 callback_->OnCaptureCompleted(frame);
42 }
43
44 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/shaped_desktop_capturer.h ('k') | remoting/host/shaped_desktop_capturer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698