Commit 9e3abb7b authored by braveyao's avatar braveyao Committed by Commit Bot

[desktopCapture OSX] Add a base::Feature command line flag to enable IOSurface capturer

Screen capturer based on IOSurface for OSX has been landed in WebRTC
and set as Disabled by default.
This cl is to add a base::Feature command line flag to enable it.

Bug: 840597
Change-Id: I7dd17ccd50e352f72a1dac809709db119275c8b6
Reviewed-on: https://chromium-review.googlesource.com/1048977Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
Commit-Queue: Weiyong Yao <braveyao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#556905}
parent 77963fef
......@@ -6,6 +6,7 @@
#include "base/feature_list.h"
#include "build/build_config.h"
#include "content/public/common/content_features.h"
namespace content {
namespace desktop_capture {
......@@ -24,7 +25,11 @@ webrtc::DesktopCaptureOptions CreateDesktopCaptureOptions() {
} else {
options.set_allow_use_magnification_api(true);
}
#endif // defined(OS_WIN)
#elif defined(OS_MACOSX)
if (base::FeatureList::IsEnabled(features::kIOSurfaceCapturer)) {
options.set_allow_iosurface(true);
}
#endif
return options;
}
......
......@@ -619,6 +619,10 @@ const char kWebXrRenderPathParamValueSharedBuffer[] = "SharedBuffer";
const base::Feature kDeviceMonitorMac{"DeviceMonitorMac",
base::FEATURE_ENABLED_BY_DEFAULT};
// Enable IOSurface based screen capturer.
const base::Feature kIOSurfaceCapturer{"IOSurfaceCapturer",
base::FEATURE_DISABLED_BY_DEFAULT};
// The V2 sandbox on MacOS removes the unsandboed warmup phase and sandboxes the
// entire life of the process.
const base::Feature kMacV2Sandbox{"MacV2Sandbox",
......
......@@ -148,6 +148,7 @@ CONTENT_EXPORT extern const char kWebXrRenderPathParamValueSharedBuffer[];
#if defined(OS_MACOSX)
CONTENT_EXPORT extern const base::Feature kDeviceMonitorMac;
CONTENT_EXPORT extern const base::Feature kIOSurfaceCapturer;
CONTENT_EXPORT extern const base::Feature kMacV2Sandbox;
#endif // defined(OS_MACOSX)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment