| 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 602600be89b309a5912c732ec1ffde3cf257753b..d8aecb15c7e86a6f5c124504f1c72f569baa9b7c 100644
|
| --- a/webrtc/modules/desktop_capture/screen_capturer_win.cc
|
| +++ b/webrtc/modules/desktop_capture/screen_capturer_win.cc
|
| @@ -11,24 +11,38 @@
|
| #include <memory>
|
| #include <utility>
|
|
|
| +#include "webrtc/modules/desktop_capture/blank_detector_desktop_capturer_wrapper.h"
|
| #include "webrtc/modules/desktop_capture/desktop_capturer.h"
|
| #include "webrtc/modules/desktop_capture/desktop_capture_options.h"
|
| #include "webrtc/modules/desktop_capture/fallback_desktop_capturer_wrapper.h"
|
| +#include "webrtc/modules/desktop_capture/rgba_color.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"
|
|
|
| namespace webrtc {
|
|
|
| +namespace {
|
| +
|
| +std::unique_ptr<DesktopCapturer> CreateScreenCapturerWinDirectx(
|
| + const DesktopCaptureOptions& options) {
|
| + std::unique_ptr<DesktopCapturer> capturer(
|
| + new ScreenCapturerWinDirectx(options));
|
| + capturer.reset(new BlankDetectorDesktopCapturerWrapper(
|
| + std::move(capturer), RgbaColor(0, 0, 0, 0)));
|
| + return capturer;
|
| +}
|
| +
|
| +} // namespace
|
| +
|
| // static
|
| std::unique_ptr<DesktopCapturer> DesktopCapturer::CreateRawScreenCapturer(
|
| const DesktopCaptureOptions& options) {
|
| - std::unique_ptr<DesktopCapturer> capturer;
|
| + std::unique_ptr<DesktopCapturer> capturer(new ScreenCapturerWinGdi(options));
|
| if (options.allow_directx_capturer() &&
|
| ScreenCapturerWinDirectx::IsSupported()) {
|
| - capturer.reset(new ScreenCapturerWinDirectx(options));
|
| - } else {
|
| - capturer.reset(new ScreenCapturerWinGdi(options));
|
| + capturer.reset(new FallbackDesktopCapturerWrapper(
|
| + CreateScreenCapturerWinDirectx(options), std::move(capturer)));
|
| }
|
|
|
| if (options.allow_use_magnification_api()) {
|
|
|