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

Unified Diff: ui/latency/latency_info.cc

Issue 2805053004: Plumbing input event latency reporting through Mus GPU.
Patch Set: NON_EXPORTED_BASE Created 3 years, 8 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 | « ui/latency/latency_info.h ('k') | ui/latency/latency_info_test_support.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/latency/latency_info.cc
diff --git a/ui/latency/latency_info.cc b/ui/latency/latency_info.cc
index 58d291ba3ff4441242509e3d2209b059f4106898..4ac939958a6e10e866814f2c5c06a02db99a68ba 100644
--- a/ui/latency/latency_info.cc
+++ b/ui/latency/latency_info.cc
@@ -37,7 +37,7 @@ const char* GetComponentName(ui::LatencyComponentType type) {
CASE_TYPE(TAB_SHOW_COMPONENT);
CASE_TYPE(INPUT_EVENT_LATENCY_RENDERER_MAIN_COMPONENT);
CASE_TYPE(INPUT_EVENT_LATENCY_RENDERER_SWAP_COMPONENT);
- CASE_TYPE(INPUT_EVENT_BROWSER_RECEIVED_RENDERER_SWAP_COMPONENT);
+ CASE_TYPE(DISPLAY_COMPOSITOR_RECEIVED_FRAME_COMPONENT);
CASE_TYPE(INPUT_EVENT_GPU_SWAP_BUFFER_COMPONENT);
CASE_TYPE(INPUT_EVENT_LATENCY_GENERATE_SCROLL_UPDATE_FROM_MOUSE_WHEEL);
CASE_TYPE(INPUT_EVENT_LATENCY_TERMINATED_NO_SWAP_COMPONENT);
@@ -355,6 +355,20 @@ bool LatencyInfo::FindLatency(LatencyComponentType type,
return true;
}
+bool LatencyInfo::FindLatency(LatencyComponentType type,
+ LatencyComponent* output) const {
+ LatencyMap::const_iterator it = latency_components_.begin();
+ while (it != latency_components_.end()) {
+ if (it->first.first == type) {
+ if (output)
+ *output = it->second;
+ return true;
+ }
+ it++;
+ }
+ return false;
+}
+
void LatencyInfo::RemoveLatency(LatencyComponentType type) {
LatencyMap::iterator it = latency_components_.begin();
while (it != latency_components_.end()) {
« no previous file with comments | « ui/latency/latency_info.h ('k') | ui/latency/latency_info_test_support.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698