| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 426 const DesktopSize& size) { | 426 const DesktopSize& size) { |
| 427 // If the current buffer is from an older generation then allocate a new one. | 427 // If the current buffer is from an older generation then allocate a new one. |
| 428 // Note that we can't reallocate other buffers at this point, since the caller | 428 // Note that we can't reallocate other buffers at this point, since the caller |
| 429 // may still be reading from them. | 429 // may still be reading from them. |
| 430 if (!queue_.current_frame() || !queue_.current_frame()->size().equals(size)) { | 430 if (!queue_.current_frame() || !queue_.current_frame()->size().equals(size)) { |
| 431 std::unique_ptr<DesktopFrame> frame = | 431 std::unique_ptr<DesktopFrame> frame = |
| 432 shared_memory_factory_ | 432 shared_memory_factory_ |
| 433 ? SharedMemoryDesktopFrame::Create(size, | 433 ? SharedMemoryDesktopFrame::Create(size, |
| 434 shared_memory_factory_.get()) | 434 shared_memory_factory_.get()) |
| 435 : std::unique_ptr<DesktopFrame>(new BasicDesktopFrame(size)); | 435 : std::unique_ptr<DesktopFrame>(new BasicDesktopFrame(size)); |
| 436 queue_.ReplaceCurrentFrame(frame.release()); | 436 queue_.ReplaceCurrentFrame(SharedDesktopFrame::Wrap(frame.release())); |
| 437 } | 437 } |
| 438 } | 438 } |
| 439 | 439 |
| 440 void ScreenCapturerWinMagnifier::StartFallbackCapturer() { | 440 void ScreenCapturerWinMagnifier::StartFallbackCapturer() { |
| 441 assert(fallback_capturer_); | 441 assert(fallback_capturer_); |
| 442 if (!fallback_capturer_started_) { | 442 if (!fallback_capturer_started_) { |
| 443 fallback_capturer_started_ = true; | 443 fallback_capturer_started_ = true; |
| 444 | 444 |
| 445 fallback_capturer_->Start(callback_); | 445 fallback_capturer_->Start(callback_); |
| 446 fallback_capturer_->SelectScreen(current_screen_id_); | 446 fallback_capturer_->SelectScreen(current_screen_id_); |
| 447 } | 447 } |
| 448 } | 448 } |
| 449 | 449 |
| 450 } // namespace webrtc | 450 } // namespace webrtc |
| OLD | NEW |