1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #include "gpu/config/gpu_info_collector.h"
6 
7 #include <stddef.h>
8 
9 #include "base/android/build_info.h"
10 #include "base/android/jni_android.h"
11 #include "base/logging.h"
12 
13 namespace gpu {
14 
CollectContextGraphicsInfo(GPUInfo * gpu_info)15 bool CollectContextGraphicsInfo(GPUInfo* gpu_info) {
16   // When command buffer is compiled as a standalone library, the process might
17   // not have a Java environment.
18   if (base::android::IsVMInitialized()) {
19     gpu_info->machine_model_name =
20         base::android::BuildInfo::GetInstance()->model();
21   }
22 
23   // At this point GL bindings have been initialized already.
24   return CollectGraphicsInfoGL(gpu_info);
25 }
26 
CollectBasicGraphicsInfo(GPUInfo * gpu_info)27 bool CollectBasicGraphicsInfo(GPUInfo* gpu_info) {
28   NOTREACHED();
29   return false;
30 }
31 
32 }  // namespace gpu
33