OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 #include "webrtc/modules/desktop_capture/blank_detector_desktop_capturer_wrapper
.h" | 11 #include "webrtc/modules/desktop_capture/blank_detector_desktop_capturer_wrapper
.h" |
12 | 12 |
13 #include <algorithm> | 13 #include <algorithm> |
14 #include <utility> | 14 #include <utility> |
15 | 15 |
| 16 #include "webrtc/base/checks.h" |
16 #include "webrtc/modules/desktop_capture/desktop_geometry.h" | 17 #include "webrtc/modules/desktop_capture/desktop_geometry.h" |
17 #include "webrtc/rtc_base/checks.h" | |
18 | 18 |
19 namespace webrtc { | 19 namespace webrtc { |
20 | 20 |
21 BlankDetectorDesktopCapturerWrapper::BlankDetectorDesktopCapturerWrapper( | 21 BlankDetectorDesktopCapturerWrapper::BlankDetectorDesktopCapturerWrapper( |
22 std::unique_ptr<DesktopCapturer> capturer, | 22 std::unique_ptr<DesktopCapturer> capturer, |
23 RgbaColor blank_pixel) | 23 RgbaColor blank_pixel) |
24 : capturer_(std::move(capturer)), | 24 : capturer_(std::move(capturer)), |
25 blank_pixel_(blank_pixel) { | 25 blank_pixel_(blank_pixel) { |
26 RTC_DCHECK(capturer_); | 26 RTC_DCHECK(capturer_); |
27 } | 27 } |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 | 106 |
107 bool BlankDetectorDesktopCapturerWrapper::IsBlankPixel( | 107 bool BlankDetectorDesktopCapturerWrapper::IsBlankPixel( |
108 const DesktopFrame& frame, | 108 const DesktopFrame& frame, |
109 int x, | 109 int x, |
110 int y) const { | 110 int y) const { |
111 uint8_t* pixel_data = frame.GetFrameDataAtPos(DesktopVector(x, y)); | 111 uint8_t* pixel_data = frame.GetFrameDataAtPos(DesktopVector(x, y)); |
112 return RgbaColor(pixel_data) == blank_pixel_; | 112 return RgbaColor(pixel_data) == blank_pixel_; |
113 } | 113 } |
114 | 114 |
115 } // namespace webrtc | 115 } // namespace webrtc |
OLD | NEW |