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 "content/browser/gpu/gpu_internals_ui.h" | 5 #include "content/browser/gpu/gpu_internals_ui.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 #include <string> | 10 #include <string> |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
246 base::DictionaryValue* info = new base::DictionaryValue(); | 246 base::DictionaryValue* info = new base::DictionaryValue(); |
247 info->Set("basic_info", basic_info); | 247 info->Set("basic_info", basic_info); |
248 | 248 |
249 #if defined(OS_WIN) | 249 #if defined(OS_WIN) |
250 std::unique_ptr<base::Value> dx_info = base::Value::CreateNullValue(); | 250 std::unique_ptr<base::Value> dx_info = base::Value::CreateNullValue(); |
251 if (gpu_info.dx_diagnostics.children.size()) | 251 if (gpu_info.dx_diagnostics.children.size()) |
252 dx_info.reset(DxDiagNodeToList(gpu_info.dx_diagnostics)); | 252 dx_info.reset(DxDiagNodeToList(gpu_info.dx_diagnostics)); |
253 info->Set("diagnostics", std::move(dx_info)); | 253 info->Set("diagnostics", std::move(dx_info)); |
254 #endif | 254 #endif |
255 | 255 |
256 #if defined(USE_X11) && !defined(OS_CHROMEOS) | |
257 basic_info->Append(NewDescriptionValuePair( | |
258 "System visual ID", base::Uint64ToString(gpu_info.system_visual))); | |
Julien Isorce Samsung
2016/09/28 17:42:51
Why "System" and not "Default" ?
| |
259 basic_info->Append(NewDescriptionValuePair( | |
260 "RGBA visual ID", base::Uint64ToString(gpu_info.rgba_visual))); | |
261 #endif | |
262 | |
256 return info; | 263 return info; |
257 } | 264 } |
258 | 265 |
259 const char* BufferFormatToString(gfx::BufferFormat format) { | 266 const char* BufferFormatToString(gfx::BufferFormat format) { |
260 switch (format) { | 267 switch (format) { |
261 case gfx::BufferFormat::ATC: | 268 case gfx::BufferFormat::ATC: |
262 return "ATC"; | 269 return "ATC"; |
263 case gfx::BufferFormat::ATCIA: | 270 case gfx::BufferFormat::ATCIA: |
264 return "ATCIA"; | 271 return "ATCIA"; |
265 case gfx::BufferFormat::DXT1: | 272 case gfx::BufferFormat::DXT1: |
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
547 : WebUIController(web_ui) { | 554 : WebUIController(web_ui) { |
548 web_ui->AddMessageHandler(new GpuMessageHandler()); | 555 web_ui->AddMessageHandler(new GpuMessageHandler()); |
549 | 556 |
550 // Set up the chrome://gpu/ source. | 557 // Set up the chrome://gpu/ source. |
551 BrowserContext* browser_context = | 558 BrowserContext* browser_context = |
552 web_ui->GetWebContents()->GetBrowserContext(); | 559 web_ui->GetWebContents()->GetBrowserContext(); |
553 WebUIDataSource::Add(browser_context, CreateGpuHTMLSource()); | 560 WebUIDataSource::Add(browser_context, CreateGpuHTMLSource()); |
554 } | 561 } |
555 | 562 |
556 } // namespace content | 563 } // namespace content |
OLD | NEW |