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

Unified 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: has -> have Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/gpu/compositor_util.cc ('k') | content/browser/resources/gpu/browser_bridge.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/gpu/gpu_internals_ui.cc
diff --git a/content/browser/gpu/gpu_internals_ui.cc b/content/browser/gpu/gpu_internals_ui.cc
index c32b27e11238ad882401a88cc8d2a3599dc1f7bc..c8a92e57201dad8f7429c856ae53d5373cf36b8b 100644
--- a/content/browser/gpu/gpu_internals_ui.cc
+++ b/content/browser/gpu/gpu_internals_ui.cc
@@ -302,7 +302,19 @@ const char* BufferUsageToString(gfx::BufferUsage usage) {
return nullptr;
}
-base::DictionaryValue* GpuMemoryBufferInfoAsDictionaryValue() {
+base::ListValue* CompositorInfo() {
+ base::ListValue* compositor_info = new base::ListValue();
+
+ compositor_info->Append(NewDescriptionValuePair(
+ "Tile Update Mode",
+ IsZeroCopyUploadEnabled() ? "Zero-copy" : "One-copy"));
+
+ compositor_info->Append(NewDescriptionValuePair(
+ "Partial Raster", IsPartialRasterEnabled() ? "Enabled" : "Disabled"));
+ return compositor_info;
+}
+
+base::ListValue* GpuMemoryBufferInfo() {
base::ListValue* gpu_memory_buffer_info = new base::ListValue();
BrowserGpuMemoryBufferManager* gpu_memory_buffer_manager =
@@ -328,11 +340,7 @@ base::DictionaryValue* GpuMemoryBufferInfoAsDictionaryValue() {
BufferFormatToString(static_cast<gfx::BufferFormat>(format)),
native_usage_support));
}
-
- base::DictionaryValue* info = new base::DictionaryValue();
- info->Set("gpu_memory_buffer_info", gpu_memory_buffer_info);
-
- return info;
+ return gpu_memory_buffer_info;
}
// This class receives javascript messages from the renderer.
@@ -508,18 +516,12 @@ void GpuMessageHandler::OnGpuInfoUpdate() {
workarounds->AppendString(workaround);
feature_status->Set("workarounds", workarounds);
gpu_info_val->Set("featureStatus", feature_status);
+ gpu_info_val->Set("compositorInfo", CompositorInfo());
+ gpu_info_val->Set("gpuMemoryBufferInfo", GpuMemoryBufferInfo());
// Send GPU Info to javascript.
web_ui()->CallJavascriptFunction("browserBridge.onGpuInfoUpdate",
*(gpu_info_val.get()));
-
- // Get GpuMemoryBuffer Info.
- scoped_ptr<base::DictionaryValue> gpu_memory_buffer_info_val(
- GpuMemoryBufferInfoAsDictionaryValue());
-
- // Send GpuMemoryBuffer Info to javascript.
- web_ui()->CallJavascriptFunction("browserBridge.onGpuMemoryBufferInfoUpdate",
- *(gpu_memory_buffer_info_val.get()));
}
void GpuMessageHandler::OnGpuSwitched() {
« no previous file with comments | « content/browser/gpu/compositor_util.cc ('k') | content/browser/resources/gpu/browser_bridge.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698