Bug 1043350 - Do not disable Aero mode when screen capturing. r=jesup, a=sledru
authorGian-Carlo Pascutto <gpascutto@mozilla.com>
Tue, 05 Aug 2014 15:48:15 +0200
changeset 216621 e9b04954e3377a2a8d0e7b90b1e26bee890acceb
parent 216620 032d5a12a6da5f37e234fd9ba3cc013406030842
child 216622 111405b7a28adacd0ed92f3f05346e989bbeb05d
push id3857
push userraliiev@mozilla.com
push dateTue, 02 Sep 2014 16:39:23 +0000
treeherdermozilla-beta@5638b907b505 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjesup, sledru
bugs1043350
milestone33.0a2
Bug 1043350 - Do not disable Aero mode when screen capturing. r=jesup, a=sledru
media/webrtc/trunk/webrtc/video_engine/desktop_capture_impl.cc
--- a/media/webrtc/trunk/webrtc/video_engine/desktop_capture_impl.cc
+++ b/media/webrtc/trunk/webrtc/video_engine/desktop_capture_impl.cc
@@ -369,26 +369,31 @@ int32_t DesktopCaptureImpl::Init(const c
 
     // processid hard-coded until implemented.  See Bug 1036653
     ProcessId processid = 0;
     pAppCapturer->SelectApp(processid);
 
     MouseCursorMonitor * pMouseCursorMonitor = MouseCursorMonitor::CreateForScreen(webrtc::DesktopCaptureOptions::CreateDefault(), webrtc::kFullDesktopScreenId);
     desktop_capturer_cursor_composer_.reset(new DesktopAndCursorComposer(pAppCapturer, pMouseCursorMonitor));
   } else if (type == Screen) {
-    ScreenCapturer *pScreenCapturer = ScreenCapturer::Create();
+
+    DesktopCaptureOptions options = DesktopCaptureOptions::CreateDefault();
+    // Leave desktop effects enabled during WebRTC captures.
+    options.set_disable_effects(false);
+
+    ScreenCapturer *pScreenCapturer = ScreenCapturer::Create(options);
     if (!pScreenCapturer) {
       return -1;
     }
 
     ScreenId screenid = atoi(uniqueId);
     pScreenCapturer->SelectScreen(screenid);
     pScreenCapturer->SetMouseShapeObserver(this);
 
-    MouseCursorMonitor * pMouseCursorMonitor = MouseCursorMonitor::CreateForScreen(webrtc::DesktopCaptureOptions::CreateDefault(), screenid);
+    MouseCursorMonitor * pMouseCursorMonitor = MouseCursorMonitor::CreateForScreen(options, screenid);
     desktop_capturer_cursor_composer_.reset(new DesktopAndCursorComposer(pScreenCapturer, pMouseCursorMonitor));
   } else if (type == Window) {
     WindowCapturer *pWindowCapturer = WindowCapturer::Create();
     if (!pWindowCapturer) {
       return -1;
     }
 
     std::string idStr(uniqueId);