OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "gpu/config/gpu_info_collector_linux.h" | 5 #include "gpu/config/gpu_info_collector_linux.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 #endif | 156 #endif |
157 } | 157 } |
158 | 158 |
159 } // namespace anonymous | 159 } // namespace anonymous |
160 | 160 |
161 CollectInfoResult CollectContextGraphicsInfo(GPUInfo* gpu_info) { | 161 CollectInfoResult CollectContextGraphicsInfo(GPUInfo* gpu_info) { |
162 DCHECK(gpu_info); | 162 DCHECK(gpu_info); |
163 | 163 |
164 TRACE_EVENT0("gpu", "gpu_info_collector::CollectGraphicsInfo"); | 164 TRACE_EVENT0("gpu", "gpu_info_collector::CollectGraphicsInfo"); |
165 | 165 |
166 if (CommandLine::ForCurrentProcess()->HasSwitch( | 166 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
167 switches::kGpuNoContextLost)) { | 167 switches::kGpuNoContextLost)) { |
168 gpu_info->can_lose_context = false; | 168 gpu_info->can_lose_context = false; |
169 } else { | 169 } else { |
170 #if defined(OS_CHROMEOS) | 170 #if defined(OS_CHROMEOS) |
171 gpu_info->can_lose_context = false; | 171 gpu_info->can_lose_context = false; |
172 #else | 172 #else |
173 // TODO(zmo): need to consider the case where we are running on top | 173 // TODO(zmo): need to consider the case where we are running on top |
174 // of desktop GL and GL_ARB_robustness extension is available. | 174 // of desktop GL and GL_ARB_robustness extension is available. |
175 gpu_info->can_lose_context = | 175 gpu_info->can_lose_context = |
176 (gfx::GetGLImplementation() == gfx::kGLImplementationEGLGLES2); | 176 (gfx::GetGLImplementation() == gfx::kGLImplementationEGLGLES2); |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 gpu_info->driver_version = driver_version; | 264 gpu_info->driver_version = driver_version; |
265 return kCollectInfoSuccess; | 265 return kCollectInfoSuccess; |
266 } | 266 } |
267 | 267 |
268 void MergeGPUInfo(GPUInfo* basic_gpu_info, | 268 void MergeGPUInfo(GPUInfo* basic_gpu_info, |
269 const GPUInfo& context_gpu_info) { | 269 const GPUInfo& context_gpu_info) { |
270 MergeGPUInfoGL(basic_gpu_info, context_gpu_info); | 270 MergeGPUInfoGL(basic_gpu_info, context_gpu_info); |
271 } | 271 } |
272 | 272 |
273 } // namespace gpu | 273 } // namespace gpu |
OLD | NEW |