Bug 1043350 - Do not disable Aero mode when screen capturing. r=jesup
authorGian-Carlo Pascutto <gpascutto@mozilla.com>
Tue, 05 Aug 2014 15:48:15 +0200
changeset 197946 e4ce6be46c38f4b1f832621ec78aef3ce9b68180
parent 197945 41a1dc07bb48c7c66abbbd1ca3aff93dc77e69fa
child 197947 5466eb0ecd3b34a2af6877b0c508e96f58e5b20d
push id27256
push userkwierso@gmail.com
push dateWed, 06 Aug 2014 00:06:20 +0000
treeherdermozilla-central@6cbdd4d523a7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjesup
bugs1043350
milestone34.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 1043350 - Do not disable Aero mode when screen capturing. r=jesup
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
@@ -354,26 +354,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 = webrtc::kFullDesktopScreenId;
     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);