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

Side by Side Diff: webrtc/modules/desktop_capture/screen_capturer_win.cc

Issue 2704943002: Use FallbackDesktopCapturerWrapper in ScreenCapturerWinMagnifier (Closed)
Patch Set: Update comments Created 3 years, 10 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 | « no previous file | webrtc/modules/desktop_capture/win/screen_capturer_win_magnifier.h » ('j') | 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) 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
11 #include <memory> 11 #include <memory>
12 #include <utility> 12 #include <utility>
13 13
14 #include "webrtc/modules/desktop_capture/desktop_capturer.h" 14 #include "webrtc/modules/desktop_capture/desktop_capturer.h"
15 #include "webrtc/modules/desktop_capture/desktop_capture_options.h" 15 #include "webrtc/modules/desktop_capture/desktop_capture_options.h"
16 #include "webrtc/modules/desktop_capture/fallback_desktop_capturer_wrapper.h"
16 #include "webrtc/modules/desktop_capture/win/screen_capturer_win_directx.h" 17 #include "webrtc/modules/desktop_capture/win/screen_capturer_win_directx.h"
17 #include "webrtc/modules/desktop_capture/win/screen_capturer_win_gdi.h" 18 #include "webrtc/modules/desktop_capture/win/screen_capturer_win_gdi.h"
18 #include "webrtc/modules/desktop_capture/win/screen_capturer_win_magnifier.h" 19 #include "webrtc/modules/desktop_capture/win/screen_capturer_win_magnifier.h"
19 20
20 namespace webrtc { 21 namespace webrtc {
21 22
22 // static 23 // static
23 std::unique_ptr<DesktopCapturer> DesktopCapturer::CreateRawScreenCapturer( 24 std::unique_ptr<DesktopCapturer> DesktopCapturer::CreateRawScreenCapturer(
24 const DesktopCaptureOptions& options) { 25 const DesktopCaptureOptions& options) {
25 std::unique_ptr<DesktopCapturer> capturer; 26 std::unique_ptr<DesktopCapturer> capturer;
26 if (options.allow_directx_capturer() && 27 if (options.allow_directx_capturer() &&
27 ScreenCapturerWinDirectx::IsSupported()) { 28 ScreenCapturerWinDirectx::IsSupported()) {
28 capturer.reset(new ScreenCapturerWinDirectx(options)); 29 capturer.reset(new ScreenCapturerWinDirectx(options));
29 } else { 30 } else {
30 capturer.reset(new ScreenCapturerWinGdi(options)); 31 capturer.reset(new ScreenCapturerWinGdi(options));
31 } 32 }
32 33
33 if (options.allow_use_magnification_api()) { 34 if (options.allow_use_magnification_api()) {
34 capturer.reset(new ScreenCapturerWinMagnifier(std::move(capturer))); 35 // ScreenCapturerWinMagnifier cannot work on Windows XP or earlier, as well
36 // as 64-bit only Windows, and it may randomly crash on multi-screen
37 // systems. So we may need to fallback to use original capturer.
38 capturer.reset(new FallbackDesktopCapturerWrapper(
39 std::unique_ptr<DesktopCapturer>(new ScreenCapturerWinMagnifier()),
40 std::move(capturer)));
35 } 41 }
36 42
37 return capturer; 43 return capturer;
38 } 44 }
39 45
40 } // namespace webrtc 46 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | webrtc/modules/desktop_capture/win/screen_capturer_win_magnifier.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698