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

Side by Side Diff: content/browser/gpu/gpu_internals_ui.cc

Issue 1637423004: Show Compositor information in chrome://gpu (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: move "GpuMemoryBuffer Status" section to below Created 4 years, 10 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
OLDNEW
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 <string> 9 #include <string>
10 10
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 NOTREACHED(); 301 NOTREACHED();
302 return nullptr; 302 return nullptr;
303 } 303 }
304 304
305 base::DictionaryValue* GpuMemoryBufferInfoAsDictionaryValue() { 305 base::DictionaryValue* GpuMemoryBufferInfoAsDictionaryValue() {
306 base::ListValue* gpu_memory_buffer_info = new base::ListValue(); 306 base::ListValue* gpu_memory_buffer_info = new base::ListValue();
307 307
308 BrowserGpuMemoryBufferManager* gpu_memory_buffer_manager = 308 BrowserGpuMemoryBufferManager* gpu_memory_buffer_manager =
309 BrowserGpuMemoryBufferManager::current(); 309 BrowserGpuMemoryBufferManager::current();
310 310
311 // Add texture uploads mode.
reveman 2016/01/29 15:43:50 I'd prefer to call it "Tile Initialization Mode" a
dshwang 2016/01/29 16:46:14 I feel a bit weird to "Initialization". one-copy a
reveman 2016/01/29 19:35:36 Sgtm
312 std::string texture_uploads_mode;
313 if (BrowserGpuMemoryBufferManager::IsNativeGpuMemoryBuffersEnabled()) {
reveman 2016/01/29 15:43:50 This is going to be confusing as native being enab
dshwang 2016/01/29 16:46:14 It's true. If native is enabled but GMB info don't
reveman 2016/01/29 19:35:36 These stats are more to help developers than users
314 texture_uploads_mode = "Native, ";
315 } else {
316 texture_uploads_mode = "Software, ";
317 }
318 if (IsZeroCopyUploadEnabled()) {
319 texture_uploads_mode += "Zero-copy ";
320 } else {
321 if (IsPartialRasterEnabled()) {
322 texture_uploads_mode += "Partial ";
323 }
324 texture_uploads_mode += "One-copy ";
325 }
reveman 2016/01/29 15:43:50 Can all this be two flags instead? 1. if zero-copy
dshwang 2016/01/29 16:46:14 currently chrome don't use partial raster even if
326 texture_uploads_mode += "texture uploads";
327 gpu_memory_buffer_info->Append(NewDescriptionValuePair(
reveman 2016/01/29 15:43:50 I don't think this belongs in gpu_memory_buffer_in
dshwang 2016/01/29 16:46:14 Ok, let me create new section: "Compositor Informa
328 "Texture Uploads Mode",
329 texture_uploads_mode));
330
311 for (size_t format = 0; 331 for (size_t format = 0;
312 format < static_cast<size_t>(gfx::BufferFormat::LAST) + 1; format++) { 332 format < static_cast<size_t>(gfx::BufferFormat::LAST) + 1; format++) {
313 std::string native_usage_support; 333 std::string native_usage_support;
314 for (size_t usage = 0; 334 for (size_t usage = 0;
315 usage < static_cast<size_t>(gfx::BufferUsage::LAST) + 1; usage++) { 335 usage < static_cast<size_t>(gfx::BufferUsage::LAST) + 1; usage++) {
316 if (gpu_memory_buffer_manager->IsNativeGpuMemoryBufferConfiguration( 336 if (gpu_memory_buffer_manager->IsNativeGpuMemoryBufferConfiguration(
317 static_cast<gfx::BufferFormat>(format), 337 static_cast<gfx::BufferFormat>(format),
318 static_cast<gfx::BufferUsage>(usage))) 338 static_cast<gfx::BufferUsage>(usage)))
319 native_usage_support = base::StringPrintf( 339 native_usage_support = base::StringPrintf(
320 "%s%s %s", native_usage_support.c_str(), 340 "%s%s %s", native_usage_support.c_str(),
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 : WebUIController(web_ui) { 559 : WebUIController(web_ui) {
540 web_ui->AddMessageHandler(new GpuMessageHandler()); 560 web_ui->AddMessageHandler(new GpuMessageHandler());
541 561
542 // Set up the chrome://gpu/ source. 562 // Set up the chrome://gpu/ source.
543 BrowserContext* browser_context = 563 BrowserContext* browser_context =
544 web_ui->GetWebContents()->GetBrowserContext(); 564 web_ui->GetWebContents()->GetBrowserContext();
545 WebUIDataSource::Add(browser_context, CreateGpuHTMLSource()); 565 WebUIDataSource::Add(browser_context, CreateGpuHTMLSource());
546 } 566 }
547 567
548 } // namespace content 568 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698