Advertisement
Guest User

chromium-vaapi.patch

a guest
Aug 30th, 2017
478
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 35.61 KB | None | 0 0
  1. From 53b93dfe87fd10cced5d2a2a63072dfc7a2af6e4 Mon Sep 17 00:00:00 2001
  2. From: Daniel Charles <daniel.charles@intel.com>
  3. Date: Fri, 28 Jul 2017 16:31:47 -0700
  4. Subject: [PATCH] Enable VAVDA, VAVEA and VAJDA on linux with VAAPI only
  5.  
  6. This patch contains all the changes necessary to use VA-API along with
  7. vaapi-driver to run all media use cases supported with hardware acceleration.
  8.  
  9. It is intended to remain as experimental accessible from chrome://flags on linux.
  10. It requires libva/intel-vaapi-driver to be installed on the system path where
  11. chrome is executed. Other drivers could be tested if available. Flags are
  12. kept independent for linux, where this feature has to be enabled before
  13. actually using it. This should not change how other OSes use the flags
  14. already, the new flags will show at the buttom on the section of unavailable
  15. experiments
  16.  
  17. The changes cover a range of compiler pre-processor flags to enable the stack.
  18. It moves the presandbox operations to the vaapi_wrapper class as the hook function
  19. is available there. vaInit will open driver on the correct installed folder.
  20.  
  21. chrome flags consolidtation into only two flags for linux. Mjpeg and accelerated
  22. video are used. The other flags are kept for ChromeOS and other OSes.
  23.  
  24. Developer testing was made on skylake hardware, ChromeOS and Ubuntu.
  25.  
  26. BUG=NONE
  27. TEST="subjective testing with VAVDA,VAVEA and VAJDA, autotest for encoder"
  28. TEST="and decoder hardware accelerated"
  29. TEST="have libva/intel-vaapi-driver installed and not installed in the system"
  30. TEST="repeat on different hardware families"
  31. R=posciak@chromium.org
  32. R=kcwu@chromium.org
  33.  
  34. Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
  35. Change-Id: Ifbbf5c9e5221a8b5733fc6d4d0cf984a1f103171
  36. Signed-off-by: Daniel Charles <daniel.charles@intel.com>
  37. ---
  38.  
  39. diff --git a/AUTHORS b/AUTHORS
  40. index 79becdb..c2905ff 100644
  41. --- a/AUTHORS
  42. +++ b/AUTHORS
  43. @@ -159,6 +159,7 @@
  44. Daniel Bevenius <daniel.bevenius@gmail.com>
  45. Daniel Bomar <dbdaniel42@gmail.com>
  46. Daniel Carvalho Liedke <dliedke@gmail.com>
  47. +Daniel Charles <daniel.charles@intel.com>
  48. Daniel Imms <daniimms@amazon.com>
  49. Daniel Johnson <danielj41@gmail.com>
  50. Daniel Lockyer <thisisdaniellockyer@gmail.com>
  51. diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
  52. index 4cb4ae5..19f663c 100644
  53. --- a/chrome/browser/about_flags.cc
  54. +++ b/chrome/browser/about_flags.cc
  55. @@ -1161,12 +1161,14 @@
  56. flag_descriptions::kUiPartialSwapDescription, kOsAll,
  57. SINGLE_DISABLE_VALUE_TYPE(switches::kUIDisablePartialSwap)},
  58. #if BUILDFLAG(ENABLE_WEBRTC)
  59. +#if !defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID)
  60. {"disable-webrtc-hw-decoding", flag_descriptions::kWebrtcHwDecodingName,
  61. flag_descriptions::kWebrtcHwDecodingDescription, kOsAndroid | kOsCrOS,
  62. SINGLE_DISABLE_VALUE_TYPE(switches::kDisableWebRtcHWDecoding)},
  63. {"disable-webrtc-hw-encoding", flag_descriptions::kWebrtcHwEncodingName,
  64. flag_descriptions::kWebrtcHwEncodingDescription, kOsAndroid | kOsCrOS,
  65. SINGLE_DISABLE_VALUE_TYPE(switches::kDisableWebRtcHWEncoding)},
  66. +#endif
  67. {"enable-webrtc-hw-h264-encoding",
  68. flag_descriptions::kWebrtcHwH264EncodingName,
  69. flag_descriptions::kWebrtcHwH264EncodingDescription, kOsAndroid | kOsCrOS,
  70. @@ -1474,6 +1476,13 @@
  71. flag_descriptions::kMultideviceDescription, kOsCrOS,
  72. FEATURE_VALUE_TYPE(features::kMultidevice)},
  73. #endif // OS_CHROMEOS
  74. +#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
  75. + {
  76. + "enable-accelerated-video", flag_descriptions::kAcceleratedVideoName,
  77. + flag_descriptions::kAcceleratedVideoDescription, kOsLinux,
  78. + SINGLE_VALUE_TYPE(switches::kEnableAcceleratedVideo),
  79. + },
  80. +#else
  81. {
  82. "disable-accelerated-video-decode",
  83. flag_descriptions::kAcceleratedVideoDecodeName,
  84. @@ -1481,6 +1490,7 @@
  85. kOsMac | kOsWin | kOsCrOS | kOsAndroid,
  86. SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode),
  87. },
  88. +#endif
  89. #if defined(OS_WIN)
  90. {
  91. "enable-hdr", flag_descriptions::kEnableHDRName,
  92. @@ -2127,12 +2137,17 @@
  93. FEATURE_VALUE_TYPE(chrome::android::kWebVrAutopresent)},
  94. #endif // OS_ANDROID
  95. #endif // ENABLE_VR
  96. -#if defined(OS_CHROMEOS)
  97. +#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
  98. + {"enable-accelerated-mjpeg-decode",
  99. + flag_descriptions::kAcceleratedMjpegDecodeName,
  100. + flag_descriptions::kAcceleratedMjpegDecodeDescription, kOsLinux,
  101. + SINGLE_VALUE_TYPE(switches::kEnableAcceleratedMjpegDecode)},
  102. +#elif defined(OS_CHROMEOS)
  103. {"disable-accelerated-mjpeg-decode",
  104. flag_descriptions::kAcceleratedMjpegDecodeName,
  105. flag_descriptions::kAcceleratedMjpegDecodeDescription, kOsCrOS,
  106. SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAcceleratedMjpegDecode)},
  107. -#endif // OS_CHROMEOS
  108. +#endif
  109. {"v8-cache-options", flag_descriptions::kV8CacheOptionsName,
  110. flag_descriptions::kV8CacheOptionsDescription, kOsAll,
  111. MULTI_VALUE_TYPE(kV8CacheOptionsChoices)},
  112. diff --git a/chrome/browser/chromeos/login/chrome_restart_request.cc b/chrome/browser/chromeos/login/chrome_restart_request.cc
  113. index 7ac532c..0afa57b 100644
  114. --- a/chrome/browser/chromeos/login/chrome_restart_request.cc
  115. +++ b/chrome/browser/chromeos/login/chrome_restart_request.cc
  116. @@ -19,6 +19,7 @@
  117. #include "base/sys_info.h"
  118. #include "base/timer/timer.h"
  119. #include "base/values.h"
  120. +#include "build/build_config.h"
  121. #include "cc/base/switches.h"
  122. #include "chrome/browser/browser_process.h"
  123. #include "chrome/browser/chromeos/boot_times_recorder.h"
  124. @@ -79,8 +80,13 @@
  125. ::switches::kDisable2dCanvasImageChromium,
  126. ::switches::kDisableAccelerated2dCanvas,
  127. ::switches::kDisableAcceleratedJpegDecoding,
  128. +#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
  129. + ::switches::kEnableAcceleratedMjpegDecode,
  130. + ::switches::kEnableAcceleratedVideo,
  131. +#else
  132. ::switches::kDisableAcceleratedMjpegDecode,
  133. ::switches::kDisableAcceleratedVideoDecode,
  134. +#endif
  135. ::switches::kDisableBlinkFeatures,
  136. ::switches::kDisableCastStreamingHWEncoding,
  137. ::switches::kDisableDistanceFieldText,
  138. @@ -169,7 +175,7 @@
  139. ::switches::kDisableWebGLImageChromium,
  140. ::switches::kEnableWebGLImageChromium,
  141. ::switches::kEnableWebVR,
  142. -#if BUILDFLAG(ENABLE_WEBRTC)
  143. +#if BUILDFLAG(ENABLE_WEBRTC) && (defined(OS_CHROMEOS) || defined(OS_ANDROID))
  144. ::switches::kDisableWebRtcHWDecoding,
  145. ::switches::kDisableWebRtcHWEncoding,
  146. #endif
  147. diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
  148. index 100f689..4e7ca96 100644
  149. --- a/chrome/browser/flag_descriptions.cc
  150. +++ b/chrome/browser/flag_descriptions.cc
  151. @@ -11,6 +11,13 @@
  152. "Enables the use of the GPU to perform 2d canvas rendering instead of "
  153. "using software rendering.";
  154.  
  155. +#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
  156. +const char kAcceleratedVideoName[] = "Hardware-accelerated video";
  157. +const char kAcceleratedVideoDescription[] =
  158. + "Hardware-accelerated video where VA-API driver is installed on the"
  159. + "system.";
  160. +#endif
  161. +
  162. const char kAcceleratedVideoDecodeName[] = "Hardware-accelerated video decode";
  163. const char kAcceleratedVideoDecodeDescription[] =
  164. "Hardware-accelerated video decode where available.";
  165. @@ -1326,6 +1333,7 @@
  166. const char kWebrtcEchoCanceller3Description[] =
  167. "Experimental WebRTC echo canceller (AEC3).";
  168.  
  169. +#if !defined(OS_LINUX) || !defined(OS_CHROMEOS)
  170. const char kWebrtcHwDecodingName[] = "WebRTC hardware video decoding";
  171. const char kWebrtcHwDecodingDescription[] =
  172. "Support in WebRTC for decoding video streams using platform hardware.";
  173. @@ -1333,6 +1341,7 @@
  174. const char kWebrtcHwEncodingName[] = "WebRTC hardware video encoding";
  175. const char kWebrtcHwEncodingDescription[] =
  176. "Support in WebRTC for encoding video streams using platform hardware.";
  177. +#endif
  178.  
  179. const char kWebrtcHwH264EncodingName[] = "WebRTC hardware h264 video encoding";
  180. const char kWebrtcHwH264EncodingDescription[] =
  181. @@ -2117,7 +2126,7 @@
  182.  
  183. #endif // defined(OS_MACOSX)
  184.  
  185. -#if defined(OS_CHROMEOS)
  186. +#if defined(OS_CHROMEOS) || (defined(OS_LINUX) && !defined(OS_ANDROID))
  187.  
  188. const char kAcceleratedMjpegDecodeName[] =
  189. "Hardware-accelerated mjpeg decode for captured frame";
  190. @@ -2126,7 +2135,7 @@
  191. "Enable hardware-accelerated mjpeg decode for captured frame where "
  192. "available.";
  193.  
  194. -#endif // defined(OS_CHROMEOS)
  195. +#endif // defined(OS_CHROMEOS) || BUILDFLAG(USE_VAAPI)
  196.  
  197. #if defined(OS_WIN)
  198.  
  199. diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
  200. index 3a99fb6..57e8c93 100644
  201. --- a/chrome/browser/flag_descriptions.h
  202. +++ b/chrome/browser/flag_descriptions.h
  203. @@ -34,6 +34,10 @@
  204. extern const char kAccelerated2dCanvasName[];
  205. extern const char kAccelerated2dCanvasDescription[];
  206.  
  207. +#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
  208. +extern const char kAcceleratedVideoName[];
  209. +extern const char kAcceleratedVideoDescription[];
  210. +#endif
  211. extern const char kAcceleratedVideoDecodeName[];
  212. extern const char kAcceleratedVideoDecodeDescription[];
  213.  
  214. @@ -1251,13 +1255,17 @@
  215.  
  216. #endif // defined(OS_MACOSX)
  217.  
  218. -// Chrome OS ------------------------------------------------------------------
  219. -
  220. -#if defined(OS_CHROMEOS)
  221. +#if defined(OS_CHROMEOS) || (defined(OS_LINUX) && !defined(OS_ANDROID))
  222.  
  223. extern const char kAcceleratedMjpegDecodeName[];
  224. extern const char kAcceleratedMjpegDecodeDescription[];
  225.  
  226. +#endif
  227. +
  228. +// Chrome OS ------------------------------------------------------------------
  229. +
  230. +#if defined(OS_CHROMEOS)
  231. +
  232. extern const char kAllowTouchpadThreeFingerClickName[];
  233. extern const char kAllowTouchpadThreeFingerClickDescription[];
  234.  
  235. diff --git a/content/browser/gpu/compositor_util.cc b/content/browser/gpu/compositor_util.cc
  236. index 0461556..3dc14164 100644
  237. --- a/content/browser/gpu/compositor_util.cc
  238. +++ b/content/browser/gpu/compositor_util.cc
  239. @@ -104,7 +104,11 @@
  240. {"video_decode",
  241. manager->IsFeatureBlacklisted(
  242. gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_DECODE),
  243. +#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
  244. + !command_line.HasSwitch(switches::kEnableAcceleratedVideo),
  245. +#else
  246. command_line.HasSwitch(switches::kDisableAcceleratedVideoDecode),
  247. +#endif
  248. "Accelerated video decode has been disabled, either via blacklist,"
  249. " about:flags or the command line.",
  250. true},
  251. @@ -112,7 +116,11 @@
  252. {"video_encode",
  253. manager->IsFeatureBlacklisted(
  254. gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_ENCODE),
  255. +#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
  256. + !command_line.HasSwitch(switches::kEnableAcceleratedVideo),
  257. +#else
  258. command_line.HasSwitch(switches::kDisableWebRtcHWEncoding),
  259. +#endif
  260. "Accelerated video encode has been disabled, either via blacklist,"
  261. " about:flags or the command line.",
  262. true},
  263. diff --git a/content/browser/gpu/gpu_data_manager_impl_private.cc b/content/browser/gpu/gpu_data_manager_impl_private.cc
  264. index d1b78d7..92819ae 100644
  265. --- a/content/browser/gpu/gpu_data_manager_impl_private.cc
  266. +++ b/content/browser/gpu/gpu_data_manager_impl_private.cc
  267. @@ -760,7 +760,11 @@
  268. DCHECK(command_line);
  269.  
  270. if (ShouldDisableAcceleratedVideoDecode(command_line))
  271. +#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
  272. + command_line->AppendSwitch(switches::kEnableAcceleratedVideo);
  273. +#else
  274. command_line->AppendSwitch(switches::kDisableAcceleratedVideoDecode);
  275. +#endif
  276.  
  277. #if defined(USE_AURA)
  278. if (!CanUseGpuBrowserCompositor())
  279. @@ -818,7 +822,11 @@
  280. }
  281.  
  282. if (ShouldDisableAcceleratedVideoDecode(command_line)) {
  283. +#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
  284. + command_line->AppendSwitch(switches::kEnableAcceleratedVideo);
  285. +#else
  286. command_line->AppendSwitch(switches::kDisableAcceleratedVideoDecode);
  287. +#endif
  288. }
  289.  
  290. if (gpu_driver_bugs_.find(gpu::CREATE_DEFAULT_GL_CONTEXT) !=
  291. @@ -912,7 +920,12 @@
  292. const base::CommandLine* command_line =
  293. base::CommandLine::ForCurrentProcess();
  294. if (!ShouldDisableAcceleratedVideoDecode(command_line) &&
  295. - !command_line->HasSwitch(switches::kDisableAcceleratedVideoDecode)) {
  296. +#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
  297. + command_line->HasSwitch(switches::kEnableAcceleratedVideo)
  298. +#else
  299. + !command_line->HasSwitch(switches::kDisableAcceleratedVideoDecode)
  300. +#endif
  301. + ) {
  302. prefs->pepper_accelerated_video_decode_enabled = true;
  303. }
  304. prefs->disable_2d_canvas_copy_on_write =
  305. @@ -1107,7 +1120,13 @@
  306. // to resolve crbug/442039 has been collected.
  307. const std::string group_name = base::FieldTrialList::FindFullName(
  308. "DisableAcceleratedVideoDecode");
  309. - if (command_line->HasSwitch(switches::kDisableAcceleratedVideoDecode)) {
  310. + if (
  311. +#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
  312. + !command_line->HasSwitch(switches::kEnableAcceleratedVideo)
  313. +#else
  314. + command_line->HasSwitch(switches::kDisableAcceleratedVideoDecode)
  315. +#endif
  316. + ) {
  317. // It was already disabled on the command line.
  318. return false;
  319. }
  320. diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc
  321. index 53e96f5..16379e8 100644
  322. --- a/content/browser/gpu/gpu_process_host.cc
  323. +++ b/content/browser/gpu/gpu_process_host.cc
  324. @@ -116,7 +116,11 @@
  325. // Command-line switches to propagate to the GPU process.
  326. static const char* const kSwitchNames[] = {
  327. switches::kCreateDefaultGLContext,
  328. +#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
  329. + switches::kEnableAcceleratedVideo,
  330. +#else
  331. switches::kDisableAcceleratedVideoDecode,
  332. +#endif
  333. switches::kDisableBreakpad,
  334. switches::kDisableES3GLContext,
  335. switches::kDisableGpuRasterization,
  336. @@ -126,7 +130,7 @@
  337. switches::kDisableLogging,
  338. switches::kDisableSeccompFilterSandbox,
  339. switches::kDisableShaderNameHashing,
  340. -#if BUILDFLAG(ENABLE_WEBRTC)
  341. +#if BUILDFLAG(ENABLE_WEBRTC) && !defined(OS_LINUX)
  342. switches::kDisableWebRtcHWEncoding,
  343. #endif
  344. #if defined(OS_WIN)
  345. diff --git a/content/browser/renderer_host/media/video_capture_browsertest.cc b/content/browser/renderer_host/media/video_capture_browsertest.cc
  346. index e4c37d1..4634e92 100644
  347. --- a/content/browser/renderer_host/media/video_capture_browsertest.cc
  348. +++ b/content/browser/renderer_host/media/video_capture_browsertest.cc
  349. @@ -154,8 +154,13 @@
  350. base::CommandLine::ForCurrentProcess()->AppendSwitch(
  351. switches::kUseFakeJpegDecodeAccelerator);
  352. } else {
  353. +#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
  354. + base::CommandLine::ForCurrentProcess()->AppendSwitch(
  355. + switches::kEnableAcceleratedMjpegDecode);
  356. +#else
  357. base::CommandLine::ForCurrentProcess()->AppendSwitch(
  358. switches::kDisableAcceleratedMjpegDecode);
  359. +#endif
  360. }
  361. if (params_.use_mojo_service) {
  362. base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
  363. diff --git a/content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.cc b/content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.cc
  364. index 6970008..89ba93d 100644
  365. --- a/content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.cc
  366. +++ b/content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.cc
  367. @@ -56,15 +56,21 @@
  368. bool is_platform_supported =
  369. base::CommandLine::ForCurrentProcess()->HasSwitch(
  370. switches::kUseFakeJpegDecodeAccelerator);
  371. -#if defined(OS_CHROMEOS)
  372. - // Non-ChromeOS platforms do not support HW JPEG decode now. Do not establish
  373. - // gpu channel to avoid introducing overhead.
  374. +#if !defined(OS_ANDROID) && defined(OS_LINUX)
  375. + // Non-ChromeOS or Non-Linux platforms do not support HW JPEG decode now. Do
  376. + // not establish gpu channel to avoid introducing overhead.
  377. is_platform_supported = true;
  378. #endif
  379.  
  380. if (!is_platform_supported ||
  381. +#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
  382. + !base::CommandLine::ForCurrentProcess()->HasSwitch(
  383. + switches::kEnableAcceleratedMjpegDecode)
  384. +#else
  385. base::CommandLine::ForCurrentProcess()->HasSwitch(
  386. - switches::kDisableAcceleratedMjpegDecode)) {
  387. + switches::kDisableAcceleratedMjpegDecode)
  388. +#endif
  389. + ) {
  390. decoder_status_ = FAILED;
  391. RecordInitDecodeUMA_Locked();
  392. return;
  393. diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
  394. index a750cdc..bd05641 100644
  395. --- a/content/browser/renderer_host/render_process_host_impl.cc
  396. +++ b/content/browser/renderer_host/render_process_host_impl.cc
  397. @@ -2450,7 +2450,11 @@
  398. switches::kDisable2dCanvasImageChromium,
  399. switches::kDisable3DAPIs,
  400. switches::kDisableAcceleratedJpegDecoding,
  401. +#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
  402. + switches::kEnableAcceleratedVideo,
  403. +#else
  404. switches::kDisableAcceleratedVideoDecode,
  405. +#endif
  406. switches::kDisableBackgroundTimerThrottling,
  407. switches::kDisableBlinkFeatures,
  408. switches::kDisableBreakpad,
  409. @@ -2603,8 +2607,10 @@
  410. switches::kEnablePepperTesting,
  411. #endif
  412. #if BUILDFLAG(ENABLE_WEBRTC)
  413. +#if !defined(OS_LINUX) || defined(OS_CHROMEOS)
  414. switches::kDisableWebRtcHWDecoding,
  415. switches::kDisableWebRtcHWEncoding,
  416. +#endif
  417. switches::kEnableWebRtcSrtpAesGcm,
  418. switches::kEnableWebRtcStunOrigin,
  419. switches::kEnforceWebRtcIPPermissionCheck,
  420. diff --git a/content/browser/webrtc/webrtc_media_recorder_browsertest.cc b/content/browser/webrtc/webrtc_media_recorder_browsertest.cc
  421. index 3d815a2..2c96048 100644
  422. --- a/content/browser/webrtc/webrtc_media_recorder_browsertest.cc
  423. +++ b/content/browser/webrtc/webrtc_media_recorder_browsertest.cc
  424. @@ -58,7 +58,12 @@
  425. return;
  426. // This flag is also used for encoding, https://crbug.com/616640.
  427. base::CommandLine::ForCurrentProcess()->AppendSwitch(
  428. - switches::kDisableAcceleratedVideoDecode);
  429. +#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
  430. + switches::kEnableAcceleratedVideo
  431. +#else
  432. + switches::kDisableAcceleratedVideoDecode
  433. +#endif
  434. + );
  435. }
  436.  
  437. private:
  438. diff --git a/content/common/sandbox_linux/bpf_gpu_policy_linux.cc b/content/common/sandbox_linux/bpf_gpu_policy_linux.cc
  439. index fe2f298a..507f481 100644
  440. --- a/content/common/sandbox_linux/bpf_gpu_policy_linux.cc
  441. +++ b/content/common/sandbox_linux/bpf_gpu_policy_linux.cc
  442. @@ -56,22 +56,6 @@
  443. #endif
  444. }
  445.  
  446. -inline bool IsArchitectureX86_64() {
  447. -#if defined(__x86_64__)
  448. - return true;
  449. -#else
  450. - return false;
  451. -#endif
  452. -}
  453. -
  454. -inline bool IsArchitectureI386() {
  455. -#if defined(__i386__)
  456. - return true;
  457. -#else
  458. - return false;
  459. -#endif
  460. -}
  461. -
  462. inline bool IsArchitectureArm() {
  463. #if defined(__arm__) || defined(__aarch64__)
  464. return true;
  465. @@ -96,21 +80,14 @@
  466. #endif
  467. }
  468.  
  469. -bool IsAcceleratedVaapiVideoEncodeEnabled() {
  470. - bool accelerated_encode_enabled = false;
  471. -#if defined(OS_CHROMEOS)
  472. - const base::CommandLine& command_line =
  473. - *base::CommandLine::ForCurrentProcess();
  474. - accelerated_encode_enabled =
  475. - !command_line.HasSwitch(switches::kDisableVaapiAcceleratedVideoEncode);
  476. -#endif
  477. - return accelerated_encode_enabled;
  478. -}
  479. -
  480. bool IsAcceleratedVideoDecodeEnabled() {
  481. const base::CommandLine& command_line =
  482. *base::CommandLine::ForCurrentProcess();
  483. +#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
  484. + return command_line.HasSwitch(switches::kEnableAcceleratedVideo);
  485. +#else
  486. return !command_line.HasSwitch(switches::kDisableAcceleratedVideoDecode);
  487. +#endif
  488. }
  489.  
  490. intptr_t GpuSIGSYS_Handler(const struct arch_seccomp_data& args,
  491. @@ -296,33 +273,6 @@
  492. GpuBrokerProcessPolicy::Create,
  493. std::vector<BrokerFilePermission>()); // No extra files in whitelist.
  494.  
  495. - if (IsArchitectureX86_64() || IsArchitectureI386()) {
  496. - // Accelerated video dlopen()'s some shared objects
  497. - // inside the sandbox, so preload them now.
  498. - if (IsAcceleratedVaapiVideoEncodeEnabled() ||
  499. - IsAcceleratedVideoDecodeEnabled()) {
  500. - const char* I965DrvVideoPath = NULL;
  501. - const char* I965HybridDrvVideoPath = NULL;
  502. -
  503. - if (IsArchitectureX86_64()) {
  504. - I965DrvVideoPath = "/usr/lib64/va/drivers/i965_drv_video.so";
  505. - I965HybridDrvVideoPath = "/usr/lib64/va/drivers/hybrid_drv_video.so";
  506. - } else if (IsArchitectureI386()) {
  507. - I965DrvVideoPath = "/usr/lib/va/drivers/i965_drv_video.so";
  508. - }
  509. -
  510. - dlopen(I965DrvVideoPath, RTLD_NOW | RTLD_GLOBAL | RTLD_NODELETE);
  511. - if (I965HybridDrvVideoPath)
  512. - dlopen(I965HybridDrvVideoPath, RTLD_NOW | RTLD_GLOBAL | RTLD_NODELETE);
  513. - dlopen("libva.so.1", RTLD_NOW | RTLD_GLOBAL | RTLD_NODELETE);
  514. -#if defined(USE_OZONE)
  515. - dlopen("libva-drm.so.1", RTLD_NOW | RTLD_GLOBAL | RTLD_NODELETE);
  516. -#elif defined(USE_X11)
  517. - dlopen("libva-x11.so.1", RTLD_NOW | RTLD_GLOBAL | RTLD_NODELETE);
  518. -#endif
  519. - }
  520. - }
  521. -
  522. return true;
  523. }
  524.  
  525. diff --git a/content/gpu/BUILD.gn b/content/gpu/BUILD.gn
  526. index a5424bb..b68b802 100644
  527. --- a/content/gpu/BUILD.gn
  528. +++ b/content/gpu/BUILD.gn
  529. @@ -45,7 +45,6 @@
  530. ]
  531.  
  532. configs += [ "//content:content_implementation" ]
  533. -
  534. deps = [
  535. "//base",
  536. "//base/third_party/dynamic_annotations",
  537. @@ -114,4 +113,8 @@
  538. if (enable_vulkan) {
  539. deps += [ "//gpu/vulkan" ]
  540. }
  541. +
  542. + if (is_desktop_linux) {
  543. + public_configs = [ "//media/gpu:libva_config" ]
  544. + }
  545. }
  546. diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc
  547. index 4b87a8c..1bbf7c8 100644
  548. --- a/content/gpu/gpu_main.cc
  549. +++ b/content/gpu/gpu_main.cc
  550. @@ -246,7 +246,7 @@
  551. // Initializes StatisticsRecorder which tracks UMA histograms.
  552. base::StatisticsRecorder::Initialize();
  553.  
  554. -#if defined(OS_ANDROID) || defined(OS_CHROMEOS)
  555. +#if defined(OS_LINUX)
  556. // Set thread priority before sandbox initialization.
  557. base::PlatformThread::SetCurrentThreadPriority(base::ThreadPriority::DISPLAY);
  558. #endif
  559. @@ -274,7 +274,7 @@
  560. GetContentClient()->SetGpuInfo(gpu_init.gpu_info());
  561.  
  562. base::ThreadPriority io_thread_priority = base::ThreadPriority::NORMAL;
  563. -#if defined(OS_ANDROID) || defined(OS_CHROMEOS)
  564. +#if defined(OS_LINUX)
  565. io_thread_priority = base::ThreadPriority::DISPLAY;
  566. #endif
  567.  
  568. diff --git a/content/public/browser/gpu_utils.cc b/content/public/browser/gpu_utils.cc
  569. index a4145ba..e9ff010 100644
  570. --- a/content/public/browser/gpu_utils.cc
  571. +++ b/content/public/browser/gpu_utils.cc
  572. @@ -7,6 +7,7 @@
  573. #include "base/command_line.h"
  574. #include "base/single_thread_task_runner.h"
  575. #include "base/strings/string_number_conversions.h"
  576. +#include "build/build_config.h"
  577. #include "content/browser/gpu/gpu_process_host.h"
  578. #include "content/public/common/content_features.h"
  579. #include "content/public/common/content_switches.h"
  580. @@ -56,12 +57,19 @@
  581. gpu_preferences.ui_prioritize_in_gpu_process =
  582. command_line->HasSwitch(switches::kUIPrioritizeInGpuProcess);
  583. gpu_preferences.disable_accelerated_video_decode =
  584. +#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
  585. + !command_line->HasSwitch(switches::kEnableAcceleratedVideo);
  586. +#else
  587. command_line->HasSwitch(switches::kDisableAcceleratedVideoDecode);
  588. -#if defined(OS_CHROMEOS)
  589. +#endif
  590. +#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
  591. + gpu_preferences.disable_vaapi_accelerated_video_encode =
  592. + !command_line->HasSwitch(switches::kEnableAcceleratedVideo);
  593. +#elif defined(OS_CHROMEOS)
  594. gpu_preferences.disable_vaapi_accelerated_video_encode =
  595. command_line->HasSwitch(switches::kDisableVaapiAcceleratedVideoEncode);
  596. #endif
  597. -#if BUILDFLAG(ENABLE_WEBRTC)
  598. +#if BUILDFLAG(ENABLE_WEBRTC) && (!defined(OS_LINUX) || defined(OS_CHROMEOS))
  599. gpu_preferences.disable_web_rtc_hw_encoding =
  600. command_line->HasSwitch(switches::kDisableWebRtcHWEncoding);
  601. #endif
  602. diff --git a/content/public/common/content_switches.cc b/content/public/common/content_switches.cc
  603. index d7101f4..d81b381 100644
  604. --- a/content/public/common/content_switches.cc
  605. +++ b/content/public/common/content_switches.cc
  606. @@ -85,12 +85,21 @@
  607.  
  608. // Disable gpu-accelerated 2d canvas.
  609. const char kDisableAccelerated2dCanvas[] = "disable-accelerated-2d-canvas";
  610. -
  611. +#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
  612. +// Enable hardware accelerated mjpeg decode on linux
  613. +const char kEnableAcceleratedMjpegDecode[] = "enable-accelerated-mjpeg-decode";
  614. +#else
  615. // Disable hardware acceleration of mjpeg decode for captured frame, where
  616. // available.
  617. const char kDisableAcceleratedMjpegDecode[] =
  618. "disable-accelerated-mjpeg-decode";
  619. +#endif
  620.  
  621. +#if defined(OS_LINUX)
  622. +// Enables hardware acceleration of video for Linux only. VA-API driver
  623. +// is required to be present on the system installation.
  624. +const char kEnableAcceleratedVideo[] = "enable-accelerated-video";
  625. +#endif
  626. // Disables hardware acceleration of video decode, where available.
  627. const char kDisableAcceleratedVideoDecode[] =
  628. "disable-accelerated-video-decode";
  629. @@ -915,11 +924,13 @@
  630. // ignores this switch on its stable and beta channels.
  631. const char kDisableWebRtcEncryption[] = "disable-webrtc-encryption";
  632.  
  633. +#if defined(OS_CHROMEOS)
  634. // Disables HW decode acceleration for WebRTC.
  635. const char kDisableWebRtcHWDecoding[] = "disable-webrtc-hw-decoding";
  636.  
  637. // Disables HW encode acceleration for WebRTC.
  638. const char kDisableWebRtcHWEncoding[] = "disable-webrtc-hw-encoding";
  639. +#endif
  640.  
  641. // Enables negotiation of GCM cipher suites from RFC 7714 for SRTP in WebRTC.
  642. // See https://tools.ietf.org/html/rfc7714 for further information.
  643. diff --git a/content/public/common/content_switches.h b/content/public/common/content_switches.h
  644. index 0227769..6d72feb 100644
  645. --- a/content/public/common/content_switches.h
  646. +++ b/content/public/common/content_switches.h
  647. @@ -34,7 +34,11 @@
  648. CONTENT_EXPORT extern const char kDisable3DAPIs[];
  649. CONTENT_EXPORT extern const char kDisableAccelerated2dCanvas[];
  650. CONTENT_EXPORT extern const char kDisableAcceleratedJpegDecoding[];
  651. +#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
  652. +CONTENT_EXPORT extern const char kEnableAcceleratedMjpegDecode[];
  653. +#else
  654. CONTENT_EXPORT extern const char kDisableAcceleratedMjpegDecode[];
  655. +#endif
  656. CONTENT_EXPORT extern const char kDisableAcceleratedVideoDecode[];
  657. CONTENT_EXPORT extern const char kDisableAudioSupportForDesktopShare[];
  658. extern const char kDisableBackingStoreLimit[];
  659. @@ -107,6 +111,9 @@
  660. CONTENT_EXPORT extern const char kDomAutomationController[];
  661. extern const char kDisable2dCanvasClipAntialiasing[];
  662. CONTENT_EXPORT extern const char kDumpBlinkRuntimeCallStats[];
  663. +#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
  664. +CONTENT_EXPORT extern const char kEnableAcceleratedVideo[];
  665. +#endif
  666. CONTENT_EXPORT extern const char kEnableAggressiveDOMStorageFlushing[];
  667. CONTENT_EXPORT extern const char kEnablePreferCompositingToLCDText[];
  668. CONTENT_EXPORT extern const char kEnableBlinkFeatures[];
  669. @@ -257,8 +264,10 @@
  670.  
  671. #if BUILDFLAG(ENABLE_WEBRTC)
  672. CONTENT_EXPORT extern const char kDisableWebRtcEncryption[];
  673. +#if defined(OS_CHROMEOS)
  674. CONTENT_EXPORT extern const char kDisableWebRtcHWDecoding[];
  675. CONTENT_EXPORT extern const char kDisableWebRtcHWEncoding[];
  676. +#endif
  677. CONTENT_EXPORT extern const char kEnableWebRtcSrtpAesGcm[];
  678. CONTENT_EXPORT extern const char kEnableWebRtcStunOrigin[];
  679. CONTENT_EXPORT extern const char kEnforceWebRtcIPPermissionCheck[];
  680. diff --git a/content/renderer/media/webrtc/peer_connection_dependency_factory.cc b/content/renderer/media/webrtc/peer_connection_dependency_factory.cc
  681. index 38fa749..7f7bf18 100644
  682. --- a/content/renderer/media/webrtc/peer_connection_dependency_factory.cc
  683. +++ b/content/renderer/media/webrtc/peer_connection_dependency_factory.cc
  684. @@ -240,10 +240,19 @@
  685.  
  686. const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess();
  687. if (gpu_factories && gpu_factories->IsGpuVideoAcceleratorEnabled()) {
  688. +#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
  689. + if (cmd_line->HasSwitch(switches::kEnableAcceleratedVideo))
  690. +#else
  691. if (!cmd_line->HasSwitch(switches::kDisableWebRtcHWDecoding))
  692. +#endif
  693. decoder_factory.reset(new RTCVideoDecoderFactory(gpu_factories));
  694.  
  695. - if (!cmd_line->HasSwitch(switches::kDisableWebRtcHWEncoding)) {
  696. +#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
  697. + if (cmd_line->HasSwitch(switches::kEnableAcceleratedVideo))
  698. +#else
  699. + if (!cmd_line->HasSwitch(switches::kDisableWebRtcHWEncoding))
  700. +#endif
  701. + {
  702. encoder_factory.reset(new RTCVideoEncoderFactory(gpu_factories));
  703. }
  704. }
  705. diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
  706. index 763f2fe..603660f 100644
  707. --- a/content/renderer/render_thread_impl.cc
  708. +++ b/content/renderer/render_thread_impl.cc
  709. @@ -1443,7 +1443,11 @@
  710. scoped_refptr<base::SingleThreadTaskRunner> media_task_runner =
  711. GetMediaThreadTaskRunner();
  712. const bool enable_video_accelerator =
  713. +#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
  714. + cmd_line->HasSwitch(switches::kEnableAcceleratedVideo);
  715. +#else
  716. !cmd_line->HasSwitch(switches::kDisableAcceleratedVideoDecode);
  717. +#endif
  718. const bool enable_gpu_memory_buffer_video_frames =
  719. #if defined(OS_MACOSX) || defined(OS_LINUX)
  720. !cmd_line->HasSwitch(switches::kDisableGpuMemoryBufferVideoFrames) &&
  721. diff --git a/gpu/command_buffer/service/gpu_preferences.h b/gpu/command_buffer/service/gpu_preferences.h
  722. index 8dd0ff1..d6e5c59 100644
  723. --- a/gpu/command_buffer/service/gpu_preferences.h
  724. +++ b/gpu/command_buffer/service/gpu_preferences.h
  725. @@ -50,7 +50,7 @@
  726. // Disables hardware acceleration of video decode, where available.
  727. bool disable_accelerated_video_decode = false;
  728.  
  729. -#if defined(OS_CHROMEOS)
  730. +#if defined(OS_CHROMEOS) || defined(OS_LINUX)
  731. // Disables VA-API accelerated video encode.
  732. bool disable_vaapi_accelerated_video_encode = false;
  733. #endif
  734. diff --git a/gpu/config/software_rendering_list.json b/gpu/config/software_rendering_list.json
  735. index ed5c6d6..4c45159 100644
  736. --- a/gpu/config/software_rendering_list.json
  737. +++ b/gpu/config/software_rendering_list.json
  738. @@ -371,17 +371,6 @@
  739. ]
  740. },
  741. {
  742. - "id": 48,
  743. - "description": "Accelerated video decode is unavailable on Linux",
  744. - "cr_bugs": [137247],
  745. - "os": {
  746. - "type": "linux"
  747. - },
  748. - "features": [
  749. - "accelerated_video_decode"
  750. - ]
  751. - },
  752. - {
  753. "id": 50,
  754. "description": "Disable VMware software renderer on older Mesa",
  755. "cr_bugs": [145531, 332596, 571899, 629434],
  756. diff --git a/media/filters/BUILD.gn b/media/filters/BUILD.gn
  757. index e8ff812..18735d2 100644
  758. --- a/media/filters/BUILD.gn
  759. +++ b/media/filters/BUILD.gn
  760. @@ -195,7 +195,7 @@
  761. ]
  762. }
  763.  
  764. - if (current_cpu != "arm" && is_chromeos) {
  765. + if (current_cpu != "arm" && (is_chromeos || is_desktop_linux)) {
  766. sources += [
  767. "h264_bitstream_buffer.cc",
  768. "h264_bitstream_buffer.h",
  769. diff --git a/media/gpu/BUILD.gn b/media/gpu/BUILD.gn
  770. index 3a65c75..dd2d957 100644
  771. --- a/media/gpu/BUILD.gn
  772. +++ b/media/gpu/BUILD.gn
  773. @@ -25,6 +25,14 @@
  774. import("//build/config/mac/mac_sdk.gni")
  775. }
  776.  
  777. +if (is_desktop_linux && use_vaapi) {
  778. + import("//build/config/linux/pkg_config.gni")
  779. +
  780. + pkg_config("libva_config") {
  781. + packages = [ "libva" ]
  782. + }
  783. +}
  784. +
  785. if (use_vaapi) {
  786. action("libva_generate_stubs") {
  787. extra_header = "va_stub_header.fragment"
  788. @@ -258,7 +266,7 @@
  789. }
  790. }
  791.  
  792. - if (is_chromeos) {
  793. + if (is_chromeos || is_desktop_linux) {
  794. sources += [
  795. "vp8_decoder.cc",
  796. "vp8_decoder.h",
  797. @@ -341,6 +349,9 @@
  798. "vaapi_drm_picture.h",
  799. ]
  800. }
  801. + if (is_desktop_linux) {
  802. + public_configs = [ ":libva_config" ]
  803. + }
  804. }
  805.  
  806. if (is_win) {
  807. @@ -387,7 +398,7 @@
  808. }
  809.  
  810. # TODO(watk): Run this on bots. http://crbug.com/461437
  811. -if (is_win || is_android || is_chromeos) {
  812. +if (is_win || is_android || is_chromeos || is_desktop_linux) {
  813. test("video_decode_accelerator_unittest") {
  814. sources = [
  815. "video_accelerator_unittest_helpers.h",
  816. @@ -500,7 +511,7 @@
  817. }
  818. }
  819.  
  820. -if (is_chromeos || is_mac || is_win) {
  821. +if (is_chromeos || is_mac || is_win || is_desktop_linux) {
  822. test("video_encode_accelerator_unittest") {
  823. deps = [
  824. "//base",
  825. @@ -532,7 +543,7 @@
  826. }
  827. }
  828.  
  829. -if (is_chromeos) {
  830. +if (is_chromeos || is_desktop_linux) {
  831. test("jpeg_decode_accelerator_unittest") {
  832. deps = [
  833. "//base",
  834. diff --git a/media/gpu/gpu_video_decode_accelerator_factory.cc b/media/gpu/gpu_video_decode_accelerator_factory.cc
  835. index b440d26..1558796 100644
  836. --- a/media/gpu/gpu_video_decode_accelerator_factory.cc
  837. +++ b/media/gpu/gpu_video_decode_accelerator_factory.cc
  838. @@ -18,7 +18,7 @@
  839. #include "media/gpu/dxva_video_decode_accelerator_win.h"
  840. #elif defined(OS_MACOSX)
  841. #include "media/gpu/vt_video_decode_accelerator_mac.h"
  842. -#elif defined(OS_CHROMEOS)
  843. +#elif defined(OS_CHROMEOS) || defined(OS_LINUX)
  844. #if defined(USE_V4L2_CODEC)
  845. #include "media/gpu/v4l2_device.h"
  846. #include "media/gpu/v4l2_slice_video_decode_accelerator.h"
  847. @@ -85,6 +85,7 @@
  848. // profile (instead of calculating a superset).
  849. // TODO(posciak,henryhsu): improve this so that we choose a superset of
  850. // resolutions and other supported profile parameters.
  851. + DVLOG(1) << "Get Supported profiles";
  852. #if defined(OS_WIN)
  853. capabilities.supported_profiles =
  854. DXVAVideoDecodeAccelerator::GetSupportedProfiles(gpu_preferences,
  855. diff --git a/media/gpu/gpu_video_encode_accelerator_factory.cc b/media/gpu/gpu_video_encode_accelerator_factory.cc
  856. index d1b8ff3..c3f1f03 100644
  857. --- a/media/gpu/gpu_video_encode_accelerator_factory.cc
  858. +++ b/media/gpu/gpu_video_encode_accelerator_factory.cc
  859. @@ -9,7 +9,7 @@
  860. #include "media/gpu/features.h"
  861. #include "media/gpu/gpu_video_accelerator_util.h"
  862.  
  863. -#if defined(OS_CHROMEOS)
  864. +#if defined(OS_CHROMEOS) || defined(OS_LINUX)
  865. #if defined(USE_V4L2_CODEC)
  866. #include "media/gpu/v4l2_video_encode_accelerator.h"
  867. #endif
  868. diff --git a/media/gpu/vaapi_wrapper.cc b/media/gpu/vaapi_wrapper.cc
  869. index 0739e56..b059fd4 100644
  870. --- a/media/gpu/vaapi_wrapper.cc
  871. +++ b/media/gpu/vaapi_wrapper.cc
  872. @@ -1110,6 +1110,7 @@
  873. if (drm_file.IsValid())
  874. GetDisplayState()->SetDrmFd(drm_file.GetPlatformFile());
  875. #endif
  876. + GetProfileInfos(); // dlopen all necessary libraries
  877. }
  878.  
  879. // static
  880. diff --git a/services/ui/gpu/gpu_main.cc b/services/ui/gpu/gpu_main.cc
  881. index f1b8567..15cf123 100644
  882. --- a/services/ui/gpu/gpu_main.cc
  883. +++ b/services/ui/gpu/gpu_main.cc
  884. @@ -10,6 +10,7 @@
  885. #include "base/power_monitor/power_monitor_device_source.h"
  886. #include "base/single_thread_task_runner.h"
  887. #include "base/threading/sequenced_task_runner_handle.h"
  888. +#include "build/build_config.h"
  889. #include "components/viz/service/display_embedder/gpu_display_provider.h"
  890. #include "components/viz/service/frame_sinks/frame_sink_manager_impl.h"
  891. #include "gpu/command_buffer/common/activity_flags.h"
  892. @@ -79,7 +80,7 @@
  893. thread_options.message_loop_type = base::MessageLoop::TYPE_IO;
  894. #endif
  895.  
  896. -#if defined(OS_ANDROID) || defined(OS_CHROMEOS)
  897. +#if defined(OS_LINUX)
  898. thread_options.priority = base::ThreadPriority::DISPLAY;
  899. #endif
  900. CHECK(gpu_thread_.StartWithOptions(thread_options));
  901. @@ -89,7 +90,7 @@
  902. // should be possible to use |main_task_runner_| for doing IO tasks.
  903. thread_options = base::Thread::Options(base::MessageLoop::TYPE_IO, 0);
  904. thread_options.priority = base::ThreadPriority::NORMAL;
  905. -#if defined(OS_ANDROID) || defined(OS_CHROMEOS)
  906. +#if defined(OS_LINUX)
  907. // TODO(reveman): Remove this in favor of setting it explicitly for each type
  908. // of process.
  909. thread_options.priority = base::ThreadPriority::DISPLAY;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement