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

Side by Side Diff: chrome/browser/dom_ui/gpu_internals_ui.cc

Issue 6289011: Add more fields into about:gpu page.... (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 | « no previous file | no next file » | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/browser/dom_ui/gpu_internals_ui.h" 5 #include "chrome/browser/dom_ui/gpu_internals_ui.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 } 272 }
273 273
274 DictionaryValue* GpuInfoToDict(const GPUInfo& gpu_info) { 274 DictionaryValue* GpuInfoToDict(const GPUInfo& gpu_info) {
275 ListValue* basic_info = new ListValue(); 275 ListValue* basic_info = new ListValue();
276 basic_info->Append(NewDescriptionValuePair("Initialization time", 276 basic_info->Append(NewDescriptionValuePair("Initialization time",
277 base::Int64ToString(gpu_info.initialization_time().InMilliseconds()))); 277 base::Int64ToString(gpu_info.initialization_time().InMilliseconds())));
278 basic_info->Append(NewDescriptionValuePair("Vendor Id", 278 basic_info->Append(NewDescriptionValuePair("Vendor Id",
279 base::StringPrintf("0x%04x", gpu_info.vendor_id()))); 279 base::StringPrintf("0x%04x", gpu_info.vendor_id())));
280 basic_info->Append(NewDescriptionValuePair("Device Id", 280 basic_info->Append(NewDescriptionValuePair("Device Id",
281 base::StringPrintf("0x%04x", gpu_info.device_id()))); 281 base::StringPrintf("0x%04x", gpu_info.device_id())));
282 basic_info->Append(NewDescriptionValuePair("Driver vendor",
283 gpu_info.driver_vendor()));
282 basic_info->Append(NewDescriptionValuePair("Driver version", 284 basic_info->Append(NewDescriptionValuePair("Driver version",
283 gpu_info.driver_version())); 285 gpu_info.driver_version()));
284 basic_info->Append(NewDescriptionValuePair("Pixel shader version", 286 basic_info->Append(NewDescriptionValuePair("Pixel shader version",
285 VersionNumberToString(gpu_info.pixel_shader_version()))); 287 VersionNumberToString(gpu_info.pixel_shader_version())));
286 basic_info->Append(NewDescriptionValuePair("Vertex shader version", 288 basic_info->Append(NewDescriptionValuePair("Vertex shader version",
287 VersionNumberToString(gpu_info.vertex_shader_version()))); 289 VersionNumberToString(gpu_info.vertex_shader_version())));
288 basic_info->Append(NewDescriptionValuePair("GL version", 290 basic_info->Append(NewDescriptionValuePair("GL version",
289 VersionNumberToString(gpu_info.gl_version()))); 291 VersionNumberToString(gpu_info.gl_version())));
292 basic_info->Append(NewDescriptionValuePair("GL_VENDOR",
293 gpu_info.gl_vendor()));
294 basic_info->Append(NewDescriptionValuePair("GL_RENDERER",
295 gpu_info.gl_renderer()));
296 basic_info->Append(NewDescriptionValuePair("GL_VERSION",
297 gpu_info.gl_version_string()));
290 298
291 DictionaryValue* info = new DictionaryValue(); 299 DictionaryValue* info = new DictionaryValue();
292 info->Set("basic_info", basic_info); 300 info->Set("basic_info", basic_info);
293 301
294 if (gpu_info.progress() == GPUInfo::kPartial) { 302 if (gpu_info.progress() == GPUInfo::kPartial) {
295 info->SetString("progress", "partial"); 303 info->SetString("progress", "partial");
296 } else { 304 } else {
297 info->SetString("progress", "complete"); 305 info->SetString("progress", "complete");
298 } 306 }
299 #if defined(OS_WIN) 307 #if defined(OS_WIN)
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 348
341 // Set up the chrome://gpu/ source. 349 // Set up the chrome://gpu/ source.
342 BrowserThread::PostTask( 350 BrowserThread::PostTask(
343 BrowserThread::IO, FROM_HERE, 351 BrowserThread::IO, FROM_HERE,
344 NewRunnableMethod( 352 NewRunnableMethod(
345 ChromeURLDataManager::GetInstance(), 353 ChromeURLDataManager::GetInstance(),
346 &ChromeURLDataManager::AddDataSource, 354 &ChromeURLDataManager::AddDataSource,
347 make_scoped_refptr(html_source))); 355 make_scoped_refptr(html_source)));
348 } 356 }
349 357
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698