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

Side by Side Diff: webrtc/modules/desktop_capture/screen_capturer_mac.mm

Issue 2433503002: Remove DesktopRegion parameter from DesktopCapturer::Capture (Closed)
Patch Set: Created 4 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
OLDNEW
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 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 class ScreenCapturerMac : public ScreenCapturer { 278 class ScreenCapturerMac : public ScreenCapturer {
279 public: 279 public:
280 explicit ScreenCapturerMac( 280 explicit ScreenCapturerMac(
281 rtc::scoped_refptr<DesktopConfigurationMonitor> desktop_config_monitor); 281 rtc::scoped_refptr<DesktopConfigurationMonitor> desktop_config_monitor);
282 virtual ~ScreenCapturerMac(); 282 virtual ~ScreenCapturerMac();
283 283
284 bool Init(); 284 bool Init();
285 285
286 // Overridden from ScreenCapturer: 286 // Overridden from ScreenCapturer:
287 void Start(Callback* callback) override; 287 void Start(Callback* callback) override;
288 void CaptureFrame() override; 288 void Capture() override;
289 void SetExcludedWindow(WindowId window) override; 289 void SetExcludedWindow(WindowId window) override;
290 bool GetScreenList(ScreenList* screens) override; 290 bool GetScreenList(ScreenList* screens) override;
291 bool SelectScreen(ScreenId id) override; 291 bool SelectScreen(ScreenId id) override;
292 292
293 private: 293 private:
294 void GlBlitFast(const DesktopFrame& frame, 294 void GlBlitFast(const DesktopFrame& frame,
295 const DesktopRegion& region); 295 const DesktopRegion& region);
296 void GlBlitSlow(const DesktopFrame& frame); 296 void GlBlitSlow(const DesktopFrame& frame);
297 void CgBlitPreLion(const DesktopFrame& frame, 297 void CgBlitPreLion(const DesktopFrame& frame,
298 const DesktopRegion& region); 298 const DesktopRegion& region);
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 queue_.Reset(); 419 queue_.Reset();
420 } 420 }
421 421
422 void ScreenCapturerMac::Start(Callback* callback) { 422 void ScreenCapturerMac::Start(Callback* callback) {
423 assert(!callback_); 423 assert(!callback_);
424 assert(callback); 424 assert(callback);
425 425
426 callback_ = callback; 426 callback_ = callback;
427 } 427 }
428 428
429 void ScreenCapturerMac::CaptureFrame() { 429 void ScreenCapturerMac::Capture() {
430 int64_t capture_start_time_nanos = rtc::TimeNanos(); 430 int64_t capture_start_time_nanos = rtc::TimeNanos();
431 431
432 queue_.MoveToNextFrame(); 432 queue_.MoveToNextFrame();
433 RTC_DCHECK(!queue_.current_frame() || !queue_.current_frame()->IsShared()); 433 RTC_DCHECK(!queue_.current_frame() || !queue_.current_frame()->IsShared());
434 434
435 desktop_config_monitor_->Lock(); 435 desktop_config_monitor_->Lock();
436 MacDesktopConfiguration new_config = 436 MacDesktopConfiguration new_config =
437 desktop_config_monitor_->desktop_configuration(); 437 desktop_config_monitor_->desktop_configuration();
438 if (!desktop_config_.Equals(new_config)) { 438 if (!desktop_config_.Equals(new_config)) {
439 desktop_config_ = new_config; 439 desktop_config_ = new_config;
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after
1031 } 1031 }
1032 1032
1033 if (options.detect_updated_region()) { 1033 if (options.detect_updated_region()) {
1034 capturer.reset(new ScreenCapturerDifferWrapper(std::move(capturer))); 1034 capturer.reset(new ScreenCapturerDifferWrapper(std::move(capturer)));
1035 } 1035 }
1036 1036
1037 return capturer.release(); 1037 return capturer.release();
1038 } 1038 }
1039 1039
1040 } // namespace webrtc 1040 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698