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

Unified Diff: ui/base/latency_info.h

Issue 14999012: Move cc/debug/latency_info to ui/base. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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/base/OWNERS ('k') | ui/base/latency_info.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/latency_info.h
diff --git a/cc/debug/latency_info.h b/ui/base/latency_info.h
similarity index 65%
rename from cc/debug/latency_info.h
rename to ui/base/latency_info.h
index e967caf345f4f384fac33a52bbeab3e7421e952d..718fbb405fe92588ac21c5ae19c2f7c47ae9a280 100644
--- a/cc/debug/latency_info.h
+++ b/ui/base/latency_info.h
@@ -2,27 +2,23 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CC_DEBUG_LATENCY_INFO_H_
-#define CC_DEBUG_LATENCY_INFO_H_
+#ifndef UI_BASE_LATENCY_INFO_H_
+#define UI_BASE_LATENCY_INFO_H_
#include <map>
#include <utility>
#include "base/basictypes.h"
#include "base/time.h"
-#include "cc/base/cc_export.h"
+#include "ui/base/ui_export.h"
-namespace cc {
+namespace ui {
enum LatencyComponentType {
- kRendererMainThread,
- kRendererImplThread,
- kBrowserMainThread,
- kBrowserImplThread,
- kInputEvent,
+ INPUT_EVENT_LATENCY_COMPONENT,
};
-struct CC_EXPORT LatencyInfo {
+struct UI_EXPORT LatencyInfo {
struct LatencyComponent {
// Nondecreasing number that can be used to determine what events happened
// in the component at the time this struct was sent on to the next
@@ -39,28 +35,36 @@ struct CC_EXPORT LatencyInfo {
typedef std::map<std::pair<LatencyComponentType, int64>, LatencyComponent>
LatencyMap;
- LatencyMap latency_components;
-
- // This represents the final time that a frame is displayed it.
- base::TimeTicks swap_timestamp;
-
LatencyInfo();
~LatencyInfo();
+ // Merges the contents of another LatencyInfo into this one.
void MergeWith(const LatencyInfo& other);
- void AddLatencyNumber(LatencyComponentType component, int64 id,
+ // Modifies the current sequence number for a component, and adds a new
+ // sequence number with the current timestamp.
+ void AddLatencyNumber(LatencyComponentType component,
+ int64 id,
int64 component_sequence_number);
+
+ // Modifies the current sequence number and adds a certain number of events
+ // for a specific component.
void AddLatencyNumberWithTimestamp(LatencyComponentType component,
- int64 id, int64 component_sequence_number,
+ int64 id,
+ int64 component_sequence_number,
base::TimeTicks time,
uint32 event_count);
void Clear();
+
+ LatencyMap latency_components;
+
+ // This represents the final time that a frame is displayed it.
+ base::TimeTicks swap_timestamp;
};
-} // namespace cc
+} // namespace ui
-#endif // CC_DEBUG_LATENCY_INFO_H_
+#endif // UI_BASE_LATENCY_INFO_H_
« no previous file with comments | « ui/base/OWNERS ('k') | ui/base/latency_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698