| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "content/gpu/gpu_info_collector.h" | 5 #include "content/gpu/gpu_info_collector.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 } | 75 } |
| 76 | 76 |
| 77 } // namespace anonymous | 77 } // namespace anonymous |
| 78 | 78 |
| 79 namespace gpu_info_collector { | 79 namespace gpu_info_collector { |
| 80 | 80 |
| 81 bool CollectGraphicsInfoGL(GPUInfo* gpu_info) { | 81 bool CollectGraphicsInfoGL(GPUInfo* gpu_info) { |
| 82 DCHECK(gpu_info); | 82 DCHECK(gpu_info); |
| 83 | 83 |
| 84 if (!gfx::GLSurface::InitializeOneOff()) { | 84 if (!gfx::GLSurface::InitializeOneOff()) { |
| 85 LOG(ERROR) << "gfx::GLContext::InitializeOneOff() failed"; | 85 LOG(ERROR) << "gfx::GLSurface::InitializeOneOff() failed"; |
| 86 return false; | 86 return false; |
| 87 } | 87 } |
| 88 | 88 |
| 89 scoped_refptr<gfx::GLSurface> surface(InitializeGLSurface()); | 89 scoped_refptr<gfx::GLSurface> surface(InitializeGLSurface()); |
| 90 if (!surface.get()) | 90 if (!surface.get()) |
| 91 return false; | 91 return false; |
| 92 | 92 |
| 93 scoped_refptr<gfx::GLContext> context(InitializeGLContext(surface.get())); | 93 scoped_refptr<gfx::GLContext> context(InitializeGLContext(surface.get())); |
| 94 if (!context.get()) | 94 if (!context.get()) |
| 95 return false; | 95 return false; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 117 | 117 |
| 118 std::string glsl_version = GetVersionFromString(glsl_version_string); | 118 std::string glsl_version = GetVersionFromString(glsl_version_string); |
| 119 gpu_info->pixel_shader_version = glsl_version; | 119 gpu_info->pixel_shader_version = glsl_version; |
| 120 gpu_info->vertex_shader_version = glsl_version; | 120 gpu_info->vertex_shader_version = glsl_version; |
| 121 | 121 |
| 122 return true; | 122 return true; |
| 123 } | 123 } |
| 124 | 124 |
| 125 } // namespace gpu_info_collector | 125 } // namespace gpu_info_collector |
| 126 | 126 |
| OLD | NEW |