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

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

Issue 880643004: Use GSC0 instead of GSC1 for video encoding. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « content/common/gpu/media/generic_v4l2_video_device.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_cros_arm_gpu_policy_linux.h" 5 #include "content/common/sandbox_linux/bpf_cros_arm_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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 #else 53 #else
54 return false; 54 return false;
55 #endif 55 #endif
56 } 56 }
57 57
58 void AddArmMaliGpuWhitelist(std::vector<BrokerFilePermission>* permissions) { 58 void AddArmMaliGpuWhitelist(std::vector<BrokerFilePermission>* permissions) {
59 // Device file needed by the ARM GPU userspace. 59 // Device file needed by the ARM GPU userspace.
60 static const char kMali0Path[] = "/dev/mali0"; 60 static const char kMali0Path[] = "/dev/mali0";
61 61
62 // Video processor used on ARM Exynos platforms. 62 // Video processor used on ARM Exynos platforms.
63 static const char kDevGsc1Path[] = "/dev/gsc1"; 63 static const char kDevGsc0Path[] = "/dev/gsc0";
64 64
65 permissions->push_back(BrokerFilePermission::ReadWrite(kMali0Path)); 65 permissions->push_back(BrokerFilePermission::ReadWrite(kMali0Path));
66 permissions->push_back(BrokerFilePermission::ReadWrite(kDevGsc1Path)); 66 permissions->push_back(BrokerFilePermission::ReadWrite(kDevGsc0Path));
67 } 67 }
68 68
69 void AddArmGpuWhitelist(std::vector<BrokerFilePermission>* permissions) { 69 void AddArmGpuWhitelist(std::vector<BrokerFilePermission>* permissions) {
70 // On ARM we're enabling the sandbox before the X connection is made, 70 // On ARM we're enabling the sandbox before the X connection is made,
71 // so we need to allow access to |.Xauthority|. 71 // so we need to allow access to |.Xauthority|.
72 static const char kXAuthorityPath[] = "/home/chronos/.Xauthority"; 72 static const char kXAuthorityPath[] = "/home/chronos/.Xauthority";
73 static const char kLdSoCache[] = "/etc/ld.so.cache"; 73 static const char kLdSoCache[] = "/etc/ld.so.cache";
74 74
75 // Files needed by the ARM GPU userspace. 75 // Files needed by the ARM GPU userspace.
76 static const char kLibGlesPath[] = "/usr/lib/libGLESv2.so.2"; 76 static const char kLibGlesPath[] = "/usr/lib/libGLESv2.so.2";
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 // Preload the Tegra V4L2 (video decode acceleration) library. 168 // Preload the Tegra V4L2 (video decode acceleration) library.
169 dlopen("/usr/lib/libtegrav4l2.so", dlopen_flag); 169 dlopen("/usr/lib/libtegrav4l2.so", dlopen_flag);
170 // Resetting errno since platform-specific libraries will fail on other 170 // Resetting errno since platform-specific libraries will fail on other
171 // platforms. 171 // platforms.
172 errno = 0; 172 errno = 0;
173 173
174 return true; 174 return true;
175 } 175 }
176 176
177 } // namespace content 177 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/media/generic_v4l2_video_device.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698