gpu_info_collector_android.cc 963 B

12345678910111213141516171819202122232425262728293031323334
  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. #include "gpu/config/gpu_info_collector.h"
  5. #include <stddef.h>
  6. #include "base/android/build_info.h"
  7. #include "base/android/jni_android.h"
  8. #include "base/notreached.h"
  9. #include "ui/gl/gl_display.h"
  10. #include "ui/gl/gl_utils.h"
  11. namespace gpu {
  12. bool CollectContextGraphicsInfo(GPUInfo* gpu_info) {
  13. // When command buffer is compiled as a standalone library, the process might
  14. // not have a Java environment.
  15. if (base::android::IsVMInitialized()) {
  16. gpu_info->machine_model_name =
  17. base::android::BuildInfo::GetInstance()->model();
  18. }
  19. // At this point GL bindings have been initialized already.
  20. return CollectGraphicsInfoGL(gpu_info, gl::GetDefaultDisplayEGL());
  21. }
  22. bool CollectBasicGraphicsInfo(GPUInfo* gpu_info) {
  23. NOTREACHED();
  24. return false;
  25. }
  26. } // namespace gpu