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

Unified Diff: ui/latency/latency_info.cc

Issue 2814483002: Splitting up RenderWidgetHostLatencyTracker and some renames. (Closed)
Patch Set: [Moving OnGpuSwapBuffersCompleted() back up. 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_tracker.h » ('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..0d5d111031307a95ad64aaeedb9bacc095b9a6b6 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_tracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698