Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(157)

Side by Side Diff: content/gpu/gpu_info_collector.cc

Issue 10051022: Add an initial Linux GPU sandbox using the seccomp filter framework. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/content_common.gypi ('k') | content/gpu/gpu_main.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 94
95 gpu_info->gl_renderer = GetGLString(GL_RENDERER); 95 gpu_info->gl_renderer = GetGLString(GL_RENDERER);
96 gpu_info->gl_vendor = GetGLString(GL_VENDOR); 96 gpu_info->gl_vendor = GetGLString(GL_VENDOR);
97 gpu_info->gl_version_string =GetGLString(GL_VERSION); 97 gpu_info->gl_version_string =GetGLString(GL_VERSION);
98 gpu_info->gl_extensions =GetGLString(GL_EXTENSIONS); 98 gpu_info->gl_extensions =GetGLString(GL_EXTENSIONS);
99 99
100 bool validGLVersionInfo = CollectGLVersionInfo(gpu_info); 100 bool validGLVersionInfo = CollectGLVersionInfo(gpu_info);
101 bool validVideoCardInfo = CollectVideoCardInfo(gpu_info); 101 bool validVideoCardInfo = CollectVideoCardInfo(gpu_info);
102 bool validDriverInfo = CollectDriverInfoGL(gpu_info); 102 bool validDriverInfo = CollectDriverInfoGL(gpu_info);
103 103
104 // TODO(kbr): remove once the destruction of a current context automatically
105 // clears the current context.
106 context->ReleaseCurrent(surface.get());
107
104 return (validGLVersionInfo && validVideoCardInfo && validDriverInfo); 108 return (validGLVersionInfo && validVideoCardInfo && validDriverInfo);
105 } 109 }
106 110
107 bool CollectGLVersionInfo(content::GPUInfo* gpu_info) { 111 bool CollectGLVersionInfo(content::GPUInfo* gpu_info) {
108 std::string gl_version_string = gpu_info->gl_version_string; 112 std::string gl_version_string = gpu_info->gl_version_string;
109 std::string glsl_version_string = 113 std::string glsl_version_string =
110 GetGLString(GL_SHADING_LANGUAGE_VERSION); 114 GetGLString(GL_SHADING_LANGUAGE_VERSION);
111 115
112 gpu_info->gl_version = GetVersionFromString(gl_version_string); 116 gpu_info->gl_version = GetVersionFromString(gl_version_string);
113 117
114 std::string glsl_version = GetVersionFromString(glsl_version_string); 118 std::string glsl_version = GetVersionFromString(glsl_version_string);
115 gpu_info->pixel_shader_version = glsl_version; 119 gpu_info->pixel_shader_version = glsl_version;
116 gpu_info->vertex_shader_version = glsl_version; 120 gpu_info->vertex_shader_version = glsl_version;
117 121
118 return true; 122 return true;
119 } 123 }
120 124
121 } // namespace gpu_info_collector 125 } // namespace gpu_info_collector
122 126
OLDNEW
« no previous file with comments | « content/content_common.gypi ('k') | content/gpu/gpu_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698