| Index: webrtc/modules/desktop_capture/screen_capturer_win.cc
|
| diff --git a/webrtc/modules/desktop_capture/screen_capturer_win.cc b/webrtc/modules/desktop_capture/screen_capturer_win.cc
|
| index 6a83bec1c522218e039063fa8f3177f6ade71562..27362667128e512c3b7372230f58f92ca876f035 100644
|
| --- a/webrtc/modules/desktop_capture/screen_capturer_win.cc
|
| +++ b/webrtc/modules/desktop_capture/screen_capturer_win.cc
|
| @@ -14,6 +14,7 @@
|
| #include <utility>
|
|
|
| #include "webrtc/modules/desktop_capture/desktop_capture_options.h"
|
| +#include "webrtc/modules/desktop_capture/screen_capturer_differ_wrapper.h"
|
| #include "webrtc/modules/desktop_capture/win/screen_capturer_win_directx.h"
|
| #include "webrtc/modules/desktop_capture/win/screen_capturer_win_gdi.h"
|
| #include "webrtc/modules/desktop_capture/win/screen_capturer_win_magnifier.h"
|
| @@ -23,15 +24,19 @@ namespace webrtc {
|
| // static
|
| ScreenCapturer* ScreenCapturer::Create(const DesktopCaptureOptions& options) {
|
| std::unique_ptr<ScreenCapturer> capturer;
|
| - if (options.allow_directx_capturer() &&
|
| - ScreenCapturerWinDirectx::IsSupported()) {
|
| + if (options.allow_directx_capturer()) {
|
| capturer.reset(new ScreenCapturerWinDirectx(options));
|
| - } else {
|
| + }
|
| + if (!capturer) {
|
| capturer.reset(new ScreenCapturerWinGdi(options));
|
| }
|
| + if (options.allow_use_magnification_api()) {
|
| + capturer.reset(new ScreenCapturerWinMagnifier(std::move(capturer)));
|
| + }
|
|
|
| - if (options.allow_use_magnification_api())
|
| - return new ScreenCapturerWinMagnifier(std::move(capturer));
|
| + if (options.accurate_updated_region()) {
|
| + capturer.reset(new ScreenCapturerDifferWrapper(std::move(capturer)));
|
| + }
|
|
|
| return capturer.release();
|
| }
|
|
|