| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 class ScreenCapturerMac : public ScreenCapturer { | 189 class ScreenCapturerMac : public ScreenCapturer { |
| 190 public: | 190 public: |
| 191 explicit ScreenCapturerMac( | 191 explicit ScreenCapturerMac( |
| 192 rtc::scoped_refptr<DesktopConfigurationMonitor> desktop_config_monitor); | 192 rtc::scoped_refptr<DesktopConfigurationMonitor> desktop_config_monitor); |
| 193 virtual ~ScreenCapturerMac(); | 193 virtual ~ScreenCapturerMac(); |
| 194 | 194 |
| 195 bool Init(); | 195 bool Init(); |
| 196 | 196 |
| 197 // Overridden from ScreenCapturer: | 197 // Overridden from ScreenCapturer: |
| 198 void Start(Callback* callback) override; | 198 void Start(Callback* callback) override; |
| 199 void Capture(const DesktopRegion& region) override; | 199 void Capture2() override; |
| 200 void SetExcludedWindow(WindowId window) override; | 200 void SetExcludedWindow(WindowId window) override; |
| 201 bool GetScreenList(ScreenList* screens) override; | 201 bool GetScreenList(ScreenList* screens) override; |
| 202 bool SelectScreen(ScreenId id) override; | 202 bool SelectScreen(ScreenId id) override; |
| 203 | 203 |
| 204 private: | 204 private: |
| 205 void GlBlitFast(const DesktopFrame& frame, | 205 void GlBlitFast(const DesktopFrame& frame, |
| 206 const DesktopRegion& region); | 206 const DesktopRegion& region); |
| 207 void GlBlitSlow(const DesktopFrame& frame); | 207 void GlBlitSlow(const DesktopFrame& frame); |
| 208 void CgBlitPreLion(const DesktopFrame& frame, | 208 void CgBlitPreLion(const DesktopFrame& frame, |
| 209 const DesktopRegion& region); | 209 const DesktopRegion& region); |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 queue_.Reset(); | 333 queue_.Reset(); |
| 334 } | 334 } |
| 335 | 335 |
| 336 void ScreenCapturerMac::Start(Callback* callback) { | 336 void ScreenCapturerMac::Start(Callback* callback) { |
| 337 assert(!callback_); | 337 assert(!callback_); |
| 338 assert(callback); | 338 assert(callback); |
| 339 | 339 |
| 340 callback_ = callback; | 340 callback_ = callback; |
| 341 } | 341 } |
| 342 | 342 |
| 343 void ScreenCapturerMac::Capture(const DesktopRegion& region_to_capture) { | 343 void ScreenCapturerMac::Capture2() { |
| 344 int64_t capture_start_time_nanos = rtc::TimeNanos(); | 344 int64_t capture_start_time_nanos = rtc::TimeNanos(); |
| 345 | 345 |
| 346 queue_.MoveToNextFrame(); | 346 queue_.MoveToNextFrame(); |
| 347 RTC_DCHECK(!queue_.current_frame() || !queue_.current_frame()->IsShared()); | 347 RTC_DCHECK(!queue_.current_frame() || !queue_.current_frame()->IsShared()); |
| 348 | 348 |
| 349 desktop_config_monitor_->Lock(); | 349 desktop_config_monitor_->Lock(); |
| 350 MacDesktopConfiguration new_config = | 350 MacDesktopConfiguration new_config = |
| 351 desktop_config_monitor_->desktop_configuration(); | 351 desktop_config_monitor_->desktop_configuration(); |
| 352 if (!desktop_config_.Equals(new_config)) { | 352 if (!desktop_config_.Equals(new_config)) { |
| 353 desktop_config_ = new_config; | 353 desktop_config_ = new_config; |
| (...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 946 } | 946 } |
| 947 | 947 |
| 948 if (options.detect_updated_region()) { | 948 if (options.detect_updated_region()) { |
| 949 capturer.reset(new ScreenCapturerDifferWrapper(std::move(capturer))); | 949 capturer.reset(new ScreenCapturerDifferWrapper(std::move(capturer))); |
| 950 } | 950 } |
| 951 | 951 |
| 952 return capturer.release(); | 952 return capturer.release(); |
| 953 } | 953 } |
| 954 | 954 |
| 955 } // namespace webrtc | 955 } // namespace webrtc |
| OLD | NEW |