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

Side by Side Diff: content/common/sandbox_linux/bpf_gpu_policy_linux.cc

Issue 374553002: VAVEA: Turn VAAPI encoder flag into a kill switch. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/common/sandbox_linux/bpf_gpu_policy_linux.h" 5 #include "content/common/sandbox_linux/bpf_gpu_policy_linux.h"
6 6
7 #include <dlfcn.h> 7 #include <dlfcn.h>
8 #include <errno.h> 8 #include <errno.h>
9 #include <fcntl.h> 9 #include <fcntl.h>
10 #include <sys/socket.h> 10 #include <sys/socket.h>
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 return false; 71 return false;
72 #endif 72 #endif
73 } 73 }
74 74
75 bool IsAcceleratedVideoEnabled() { 75 bool IsAcceleratedVideoEnabled() {
76 const base::CommandLine& command_line = 76 const base::CommandLine& command_line =
77 *base::CommandLine::ForCurrentProcess(); 77 *base::CommandLine::ForCurrentProcess();
78 bool accelerated_encode_enabled = false; 78 bool accelerated_encode_enabled = false;
79 #if defined(OS_CHROMEOS) 79 #if defined(OS_CHROMEOS)
80 accelerated_encode_enabled = 80 accelerated_encode_enabled =
81 command_line.HasSwitch(switches::kEnableVaapiAcceleratedVideoEncode); 81 !command_line.HasSwitch(switches::kDisableVaapiAcceleratedVideoEncode);
82 #endif 82 #endif
83 return !command_line.HasSwitch(switches::kDisableAcceleratedVideoDecode) || 83 return !command_line.HasSwitch(switches::kDisableAcceleratedVideoDecode) ||
84 accelerated_encode_enabled; 84 accelerated_encode_enabled;
85 } 85 }
86 86
87 intptr_t GpuSIGSYS_Handler(const struct arch_seccomp_data& args, 87 intptr_t GpuSIGSYS_Handler(const struct arch_seccomp_data& args,
88 void* aux_broker_process) { 88 void* aux_broker_process) {
89 RAW_CHECK(aux_broker_process); 89 RAW_CHECK(aux_broker_process);
90 BrokerProcess* broker_process = 90 BrokerProcess* broker_process =
91 static_cast<BrokerProcess*>(aux_broker_process); 91 static_cast<BrokerProcess*>(aux_broker_process);
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 broker_process_ = new BrokerProcess(GetFSDeniedErrno(), 267 broker_process_ = new BrokerProcess(GetFSDeniedErrno(),
268 read_whitelist, 268 read_whitelist,
269 write_whitelist); 269 write_whitelist);
270 // The initialization callback will perform generic initialization and then 270 // The initialization callback will perform generic initialization and then
271 // call broker_sandboxer_callback. 271 // call broker_sandboxer_callback.
272 CHECK(broker_process_->Init(base::Bind(&UpdateProcessTypeAndEnableSandbox, 272 CHECK(broker_process_->Init(base::Bind(&UpdateProcessTypeAndEnableSandbox,
273 broker_sandboxer_allocator))); 273 broker_sandboxer_allocator)));
274 } 274 }
275 275
276 } // namespace content 276 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/media/vaapi_video_encode_accelerator.cc ('k') | content/public/common/content_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698