static void VADisplayState PreSandboxInitializa tion const char kDriRe

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// static
void VADisplayState::PreSandboxInitialization() {
{
const char kDriRenderNode0Path[] = "/dev/dri/renderD128";
base::File drm_file = base::File(
base::FilePath::FromUTF8Unsafe(kDriRenderNode0Path),
base::File::FLAG_OPEN | base::File::FLAG_READ | base::File::FLAG_WRITE);
if (drm_file.IsValid())
VADisplayState::Get()->SetDrmFd(drm_file.GetPlatformFile());
}
{
const char kDriRenderNode1Path[] = "/dev/dri/renderD129";
base::File drm_file = base::File(
base::FilePath::FromUTF8Unsafe(kDriRenderNode1Path),
base::File::FLAG_OPEN | base::File::FLAG_READ | base::File::FLAG_WRITE);
if (drm_file.IsValid())
VADisplayState::Get()->SetDrmFd(drm_file.GetPlatformFile());
}
const char kNvidiaPath[] = "/dev/dri/nvidiactl";
base::File nvidia_file = base::File(
base::FilePath::FromUTF8Unsafe(kNvidiaPath),
base::File::FLAG_OPEN | base::File::FLAG_READ | base::File::FLAG_WRITE);
}