Bug 1497602 - Enable DirectX screen capturer on Windows; r=pehrsons
authorDan Minor <dminor@mozilla.com>
Thu, 29 Nov 2018 13:27:23 +0000
changeset 505146 eb07312cfbe868780ebed84fc83e5a5470e81fb4
parent 505145 eff4ffb1d280a3dc97b330d876d72542ee2ee32d
child 505147 8ea04ec01e9905d4714aa01ade891d552c56a3a6
push id10290
push userffxbld-merge
push dateMon, 03 Dec 2018 16:23:23 +0000
treeherdermozilla-beta@700bed2445e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspehrsons
bugs1497602
milestone65.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1497602 - Enable DirectX screen capturer on Windows; r=pehrsons This enables support for the DirectX screen capturer. We use the default DesktopCaptureOptions which do not set the option to use the DirectX screen capturer so this change will have no effect with the current code. For what it's worth, I tested enabling the DirectX option and it worked fine on my system, but I don't see any reason to not follow the defaults provided by webrtc.org in this case. Differential Revision: https://phabricator.services.mozilla.com/D13303
media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_win.cc
--- a/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_win.cc
+++ b/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_win.cc
@@ -33,27 +33,25 @@ std::unique_ptr<DesktopCapturer> CreateS
 }
 
 }  // namespace
 
 // static
 std::unique_ptr<DesktopCapturer> DesktopCapturer::CreateRawScreenCapturer(
     const DesktopCaptureOptions& options) {
   std::unique_ptr<DesktopCapturer> capturer(new ScreenCapturerWinGdi(options));
-#ifdef CAPTURE_ALLOW_DIRECTX
   if (options.allow_directx_capturer()) {
     // |dxgi_duplicator_controller| should be alive in this scope to ensure it
     // won't unload DxgiDuplicatorController.
     auto dxgi_duplicator_controller = DxgiDuplicatorController::Instance();
     if (ScreenCapturerWinDirectx::IsSupported()) {
       capturer.reset(new FallbackDesktopCapturerWrapper(
           CreateScreenCapturerWinDirectx(), std::move(capturer)));
     }
   }
-#endif
 
   if (options.allow_use_magnification_api()) {
     // ScreenCapturerWinMagnifier cannot work on Windows XP or earlier, as well
     // as 64-bit only Windows, and it may randomly crash on multi-screen
     // systems. So we may need to fallback to use original capturer.
     capturer.reset(new FallbackDesktopCapturerWrapper(
         std::unique_ptr<DesktopCapturer>(new ScreenCapturerWinMagnifier()),
         std::move(capturer)));