| 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 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 NOTREACHED(); | 297 NOTREACHED(); |
| 298 return nullptr; | 298 return nullptr; |
| 299 } | 299 } |
| 300 | 300 |
| 301 const char* BufferUsageToString(gfx::BufferUsage usage) { | 301 const char* BufferUsageToString(gfx::BufferUsage usage) { |
| 302 switch (usage) { | 302 switch (usage) { |
| 303 case gfx::BufferUsage::GPU_READ: | 303 case gfx::BufferUsage::GPU_READ: |
| 304 return "GPU_READ"; | 304 return "GPU_READ"; |
| 305 case gfx::BufferUsage::SCANOUT: | 305 case gfx::BufferUsage::SCANOUT: |
| 306 return "SCANOUT"; | 306 return "SCANOUT"; |
| 307 case gfx::BufferUsage::SCANOUT_CPU_READ_WRITE: |
| 308 return "SCANOUT_CPU_READ_WRITE"; |
| 307 case gfx::BufferUsage::GPU_READ_CPU_READ_WRITE: | 309 case gfx::BufferUsage::GPU_READ_CPU_READ_WRITE: |
| 308 return "GPU_READ_CPU_READ_WRITE"; | 310 return "GPU_READ_CPU_READ_WRITE"; |
| 309 case gfx::BufferUsage::GPU_READ_CPU_READ_WRITE_PERSISTENT: | 311 case gfx::BufferUsage::GPU_READ_CPU_READ_WRITE_PERSISTENT: |
| 310 return "GPU_READ_CPU_READ_WRITE_PERSISTENT"; | 312 return "GPU_READ_CPU_READ_WRITE_PERSISTENT"; |
| 311 } | 313 } |
| 312 NOTREACHED(); | 314 NOTREACHED(); |
| 313 return nullptr; | 315 return nullptr; |
| 314 } | 316 } |
| 315 | 317 |
| 316 base::ListValue* CompositorInfo() { | 318 base::ListValue* CompositorInfo() { |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 552 : WebUIController(web_ui) { | 554 : WebUIController(web_ui) { |
| 553 web_ui->AddMessageHandler(base::MakeUnique<GpuMessageHandler>()); | 555 web_ui->AddMessageHandler(base::MakeUnique<GpuMessageHandler>()); |
| 554 | 556 |
| 555 // Set up the chrome://gpu/ source. | 557 // Set up the chrome://gpu/ source. |
| 556 BrowserContext* browser_context = | 558 BrowserContext* browser_context = |
| 557 web_ui->GetWebContents()->GetBrowserContext(); | 559 web_ui->GetWebContents()->GetBrowserContext(); |
| 558 WebUIDataSource::Add(browser_context, CreateGpuHTMLSource()); | 560 WebUIDataSource::Add(browser_context, CreateGpuHTMLSource()); |
| 559 } | 561 } |
| 560 | 562 |
| 561 } // namespace content | 563 } // namespace content |
| OLD | NEW |