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

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

Issue 490233002: VaapiVideoAccelerator: make Vaapi accelerator work with ozone (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix vaapi_h264_decoder_unittest Created 6 years 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
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 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 251
252 if (IsArchitectureX86_64()) { 252 if (IsArchitectureX86_64()) {
253 I965DrvVideoPath = "/usr/lib64/va/drivers/i965_drv_video.so"; 253 I965DrvVideoPath = "/usr/lib64/va/drivers/i965_drv_video.so";
254 } else if (IsArchitectureI386()) { 254 } else if (IsArchitectureI386()) {
255 I965DrvVideoPath = "/usr/lib/va/drivers/i965_drv_video.so"; 255 I965DrvVideoPath = "/usr/lib/va/drivers/i965_drv_video.so";
256 } 256 }
257 257
258 dlopen(I965DrvVideoPath, RTLD_NOW|RTLD_GLOBAL|RTLD_NODELETE); 258 dlopen(I965DrvVideoPath, RTLD_NOW|RTLD_GLOBAL|RTLD_NODELETE);
259 dlopen("libva.so.1", RTLD_NOW|RTLD_GLOBAL|RTLD_NODELETE); 259 dlopen("libva.so.1", RTLD_NOW|RTLD_GLOBAL|RTLD_NODELETE);
260 dlopen("libva-x11.so.1", RTLD_NOW|RTLD_GLOBAL|RTLD_NODELETE); 260 dlopen("libva-x11.so.1", RTLD_NOW|RTLD_GLOBAL|RTLD_NODELETE);
261 dlopen("libva-drm.so.1", RTLD_NOW | RTLD_GLOBAL | RTLD_NODELETE);
261 } 262 }
262 } 263 }
263 264
264 return true; 265 return true;
265 } 266 }
266 267
267 void GpuProcessPolicy::InitGpuBrokerProcess( 268 void GpuProcessPolicy::InitGpuBrokerProcess(
268 sandbox::bpf_dsl::Policy* (*broker_sandboxer_allocator)(void), 269 sandbox::bpf_dsl::Policy* (*broker_sandboxer_allocator)(void),
269 const std::vector<BrokerFilePermission>& permissions_extra) { 270 const std::vector<BrokerFilePermission>& permissions_extra) {
270 static const char kDriRcPath[] = "/etc/drirc"; 271 static const char kDriRcPath[] = "/etc/drirc";
(...skipping 17 matching lines...) Expand all
288 } 289 }
289 290
290 broker_process_ = new BrokerProcess(GetFSDeniedErrno(), permissions); 291 broker_process_ = new BrokerProcess(GetFSDeniedErrno(), permissions);
291 // The initialization callback will perform generic initialization and then 292 // The initialization callback will perform generic initialization and then
292 // call broker_sandboxer_callback. 293 // call broker_sandboxer_callback.
293 CHECK(broker_process_->Init(base::Bind(&UpdateProcessTypeAndEnableSandbox, 294 CHECK(broker_process_->Init(base::Bind(&UpdateProcessTypeAndEnableSandbox,
294 broker_sandboxer_allocator))); 295 broker_sandboxer_allocator)));
295 } 296 }
296 297
297 } // namespace content 298 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698