Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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.h" | 5 #include "gpu/config/gpu_info_collector.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 169 | 169 |
| 170 IdentifyActiveGPU(gpu_info); | 170 IdentifyActiveGPU(gpu_info); |
| 171 return CollectDriverInfoGL(gpu_info); | 171 return CollectDriverInfoGL(gpu_info); |
| 172 } | 172 } |
| 173 | 173 |
| 174 void MergeGPUInfoGL(GPUInfo* basic_gpu_info, | 174 void MergeGPUInfoGL(GPUInfo* basic_gpu_info, |
| 175 const GPUInfo& context_gpu_info) { | 175 const GPUInfo& context_gpu_info) { |
| 176 DCHECK(basic_gpu_info); | 176 DCHECK(basic_gpu_info); |
| 177 // Copy over GPUs because which one is active could change. | 177 // Copy over GPUs because which one is active could change. |
| 178 basic_gpu_info->gpu = context_gpu_info.gpu; | 178 basic_gpu_info->gpu = context_gpu_info.gpu; |
| 179 basic_gpu_info->secondary_gpus = context_gpu_info.secondary_gpus; | 179 |
| 180 // TODO(j.isorce): Currently the GPU process does not know about any secondary | |
| 181 // gpu. So for now make sure to keep them when receiving GpuInfo from the GPU | |
| 182 // process through GpuHostMsg_GraphicsInfoCollected. | |
| 183 if (context_gpu_info.secondary_gpus.size() > 0) | |
|
Ken Russell (switch to Gerrit)
2016/04/05 03:31:24
This change is concerning. If it's only needed for
| |
| 184 basic_gpu_info->secondary_gpus = context_gpu_info.secondary_gpus; | |
| 180 | 185 |
| 181 basic_gpu_info->gl_renderer = context_gpu_info.gl_renderer; | 186 basic_gpu_info->gl_renderer = context_gpu_info.gl_renderer; |
| 182 basic_gpu_info->gl_vendor = context_gpu_info.gl_vendor; | 187 basic_gpu_info->gl_vendor = context_gpu_info.gl_vendor; |
| 183 basic_gpu_info->gl_version = context_gpu_info.gl_version; | 188 basic_gpu_info->gl_version = context_gpu_info.gl_version; |
| 184 basic_gpu_info->gl_extensions = context_gpu_info.gl_extensions; | 189 basic_gpu_info->gl_extensions = context_gpu_info.gl_extensions; |
| 185 basic_gpu_info->pixel_shader_version = | 190 basic_gpu_info->pixel_shader_version = |
| 186 context_gpu_info.pixel_shader_version; | 191 context_gpu_info.pixel_shader_version; |
| 187 basic_gpu_info->vertex_shader_version = | 192 basic_gpu_info->vertex_shader_version = |
| 188 context_gpu_info.vertex_shader_version; | 193 context_gpu_info.vertex_shader_version; |
| 189 basic_gpu_info->max_msaa_samples = | 194 basic_gpu_info->max_msaa_samples = |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 265 for (size_t ii = 0; ii < gpu_info->secondary_gpus.size(); ++ii) { | 270 for (size_t ii = 0; ii < gpu_info->secondary_gpus.size(); ++ii) { |
| 266 if (active_vendor_id == gpu_info->secondary_gpus[ii].vendor_id) { | 271 if (active_vendor_id == gpu_info->secondary_gpus[ii].vendor_id) { |
| 267 gpu_info->secondary_gpus[ii].active = true; | 272 gpu_info->secondary_gpus[ii].active = true; |
| 268 return; | 273 return; |
| 269 } | 274 } |
| 270 } | 275 } |
| 271 } | 276 } |
| 272 | 277 |
| 273 } // namespace gpu | 278 } // namespace gpu |
| 274 | 279 |
| OLD | NEW |