Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(871)

Unified Diff: content/common/sandbox_linux/bpf_gpu_policy_linux.cc

Issue 333253002: Add VaapiVideoEncodeAccelerator for HW-accelerated video encode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update pre-sandbox hook to include accelerated encode Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/common/sandbox_linux/bpf_gpu_policy_linux.cc
diff --git a/content/common/sandbox_linux/bpf_gpu_policy_linux.cc b/content/common/sandbox_linux/bpf_gpu_policy_linux.cc
index d6b54f8ef55abd7bd96b4565eaa0c153e6ed39cd..22de352c624267d9edaf86513faa0b6bb40b1544 100644
--- a/content/common/sandbox_linux/bpf_gpu_policy_linux.cc
+++ b/content/common/sandbox_linux/bpf_gpu_policy_linux.cc
@@ -72,9 +72,10 @@ inline bool IsArchitectureArm() {
#endif
}
-bool IsAcceleratedVideoDecodeEnabled() {
+bool IsAcceleratedVideoEnabled() {
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
- return !command_line.HasSwitch(switches::kDisableAcceleratedVideoDecode);
+ return !command_line.HasSwitch(switches::kDisableAcceleratedVideoDecode) ||
+ command_line.HasSwitch(switches::kEnableVaapiAcceleratedVideoEncode);
}
intptr_t GpuSIGSYS_Handler(const struct arch_seccomp_data& args,
@@ -214,9 +215,9 @@ bool GpuProcessPolicy::PreSandboxHook() {
std::vector<std::string>());
if (IsArchitectureX86_64() || IsArchitectureI386()) {
- // Accelerated video decode dlopen()'s some shared objects
+ // Accelerated video dlopen()'s some shared objects
// inside the sandbox, so preload them now.
- if (IsAcceleratedVideoDecodeEnabled()) {
+ if (IsAcceleratedVideoEnabled()) {
const char* I965DrvVideoPath = NULL;
if (IsArchitectureX86_64()) {

Powered by Google App Engine
This is Rietveld 408576698