OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "chrome/browser/gpu/gpu_driver_info_manager_android.h" | 5 #include "chrome/browser/gpu/gpu_driver_info_manager_android.h" |
6 | 6 |
7 #include "base/android/build_info.h" | 7 #include "base/android/build_info.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 gpu_info.gl_extensions = local_state->GetString( | 60 gpu_info.gl_extensions = local_state->GetString( |
61 prefs::kGLExtensionsString); | 61 prefs::kGLExtensionsString); |
62 gpu_info.max_msaa_samples = local_state->GetString( | 62 gpu_info.max_msaa_samples = local_state->GetString( |
63 prefs::kGpuDriverInfoMaxSamples); | 63 prefs::kGpuDriverInfoMaxSamples); |
64 gpu_info.gl_reset_notification_strategy = local_state->GetInteger( | 64 gpu_info.gl_reset_notification_strategy = local_state->GetInteger( |
65 prefs::kGpuDriverInfoResetNotificationStrategy); | 65 prefs::kGpuDriverInfoResetNotificationStrategy); |
66 std::string shader_version = local_state->GetString( | 66 std::string shader_version = local_state->GetString( |
67 prefs::kGpuDriverInfoShaderVersion); | 67 prefs::kGpuDriverInfoShaderVersion); |
68 gpu_info.pixel_shader_version = shader_version; | 68 gpu_info.pixel_shader_version = shader_version; |
69 gpu_info.vertex_shader_version = shader_version; | 69 gpu_info.vertex_shader_version = shader_version; |
70 gpu_info.can_lose_context = false; | |
71 gpu_info.machine_model_name = BuildInfo::GetInstance()->model(); | 70 gpu_info.machine_model_name = BuildInfo::GetInstance()->model(); |
72 | 71 |
73 gpu::CollectInfoResult result = gpu::CollectDriverInfoGL(&gpu_info); | 72 gpu::CollectInfoResult result = gpu::CollectDriverInfoGL(&gpu_info); |
74 gpu_info.basic_info_state = result; | 73 gpu_info.basic_info_state = result; |
75 gpu_info.context_info_state = result; | 74 gpu_info.context_info_state = result; |
76 content::GpuDataManager::GetInstance()->SetGpuInfo(gpu_info); | 75 content::GpuDataManager::GetInstance()->SetGpuInfo(gpu_info); |
77 } | 76 } |
78 | 77 |
79 void GpuDriverInfoManager::OnGpuInfoUpdate() { | 78 void GpuDriverInfoManager::OnGpuInfoUpdate() { |
80 PrefService* local_state = g_browser_process->local_state(); | 79 PrefService* local_state = g_browser_process->local_state(); |
(...skipping 10 matching lines...) Expand all Loading... |
91 prefs::kGpuDriverInfoMaxSamples, gpu_info.max_msaa_samples); | 90 prefs::kGpuDriverInfoMaxSamples, gpu_info.max_msaa_samples); |
92 local_state->SetInteger(prefs::kGpuDriverInfoResetNotificationStrategy, | 91 local_state->SetInteger(prefs::kGpuDriverInfoResetNotificationStrategy, |
93 gpu_info.gl_reset_notification_strategy); | 92 gpu_info.gl_reset_notification_strategy); |
94 local_state->SetString(prefs::kGpuDriverInfoShaderVersion, | 93 local_state->SetString(prefs::kGpuDriverInfoShaderVersion, |
95 gpu_info.pixel_shader_version); | 94 gpu_info.pixel_shader_version); |
96 local_state->SetString(prefs::kGpuDriverInfoBuildFingerPrint, | 95 local_state->SetString(prefs::kGpuDriverInfoBuildFingerPrint, |
97 BuildInfo::GetInstance()->android_build_fp()); | 96 BuildInfo::GetInstance()->android_build_fp()); |
98 content::GpuDataManager::GetInstance()->RemoveObserver(this); | 97 content::GpuDataManager::GetInstance()->RemoveObserver(this); |
99 } | 98 } |
100 | 99 |
OLD | NEW |