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

Side by Side Diff: webrtc/modules/desktop_capture/win/screen_capturer_win_magnifier.cc

Issue 1902323002: Modify ScreenCaptureFrameQueue into a template (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fix build break in Chromium Created 4 years, 8 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
« no previous file with comments | « webrtc/modules/desktop_capture/win/screen_capturer_win_magnifier.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « webrtc/modules/desktop_capture/win/screen_capturer_win_magnifier.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698