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

Side by Side Diff: chrome/gpu/gpu_info_collector_mac.mm

Issue 6364013: Defered collect DirectX diagnostics until they are needed for about:gpu.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 11 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 | « chrome/common/gpu_param_traits.h ('k') | chrome/gpu/gpu_info_collector_win.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) 2006-2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2010 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/gpu/gpu_info_collector.h" 5 #include "chrome/gpu/gpu_info_collector.h"
6 #include "base/logging.h" 6 #include "base/logging.h"
7 #include "base/scoped_ptr.h" 7 #include "base/scoped_ptr.h"
8 #include "base/string_piece.h" 8 #include "base/string_piece.h"
9 #include "base/sys_string_conversions.h" 9 #include "base/sys_string_conversions.h"
10 #include "app/gfx/gl/gl_bindings.h" 10 #include "app/gfx/gl/gl_bindings.h"
(...skipping 30 matching lines...) Expand all
41 41
42 } // namespace anonymous 42 } // namespace anonymous
43 43
44 namespace gpu_info_collector { 44 namespace gpu_info_collector {
45 45
46 bool CollectGraphicsInfo(GPUInfo* gpu_info) { 46 bool CollectGraphicsInfo(GPUInfo* gpu_info) {
47 DCHECK(gpu_info); 47 DCHECK(gpu_info);
48 48
49 gpu_info->SetCanLoseContext( 49 gpu_info->SetCanLoseContext(
50 gfx::GetGLImplementation() == gfx::kGLImplementationEGLGLES2); 50 gfx::GetGLImplementation() == gfx::kGLImplementationEGLGLES2);
51 gpu_info->SetProgress(GPUInfo::kComplete); 51 gpu_info->SetLevel(GPUInfo::kComplete);
52 return CollectGraphicsInfoGL(gpu_info); 52 return CollectGraphicsInfoGL(gpu_info);
53 } 53 }
54 54
55 bool CollectVideoCardInfo(GPUInfo* gpu_info) { 55 bool CollectVideoCardInfo(GPUInfo* gpu_info) {
56 DCHECK(gpu_info); 56 DCHECK(gpu_info);
57 57
58 if (gfx::GetGLImplementation() != gfx::kGLImplementationDesktopGL) 58 if (gfx::GetGLImplementation() != gfx::kGLImplementationDesktopGL)
59 return false; 59 return false;
60 60
61 UInt32 vendor_id = 0, device_id = 0; 61 UInt32 vendor_id = 0, device_id = 0;
(...skipping 22 matching lines...) Expand all
84 // Use some jiggery-pokery to turn that utf8 string into a std::wstring. 84 // Use some jiggery-pokery to turn that utf8 string into a std::wstring.
85 std::string gl_version_string = gpu_info->gl_version_string(); 85 std::string gl_version_string = gpu_info->gl_version_string();
86 size_t pos = gl_version_string.find_last_of('-'); 86 size_t pos = gl_version_string.find_last_of('-');
87 if (pos == std::string::npos) 87 if (pos == std::string::npos)
88 return false; 88 return false;
89 gpu_info->SetDriverInfo("", gl_version_string.substr(pos + 1)); 89 gpu_info->SetDriverInfo("", gl_version_string.substr(pos + 1));
90 return true; 90 return true;
91 } 91 }
92 92
93 } // namespace gpu_info_collector 93 } // namespace gpu_info_collector
OLDNEW
« no previous file with comments | « chrome/common/gpu_param_traits.h ('k') | chrome/gpu/gpu_info_collector_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698