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

Unified Diff: content/browser/renderer_host/render_widget_host_latency_tracker.h

Issue 833283003: Reland "Add new latency_info for tracking browser composite time." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rename component Created 5 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
Index: content/browser/renderer_host/render_widget_host_latency_tracker.h
diff --git a/content/browser/renderer_host/render_widget_host_latency_tracker.h b/content/browser/renderer_host/render_widget_host_latency_tracker.h
index cdf43a54595346c92c17ec014dea5cbc533c8362..08c580c7678723aa4454b49dbbd6ea6ecf386f43 100644
--- a/content/browser/renderer_host/render_widget_host_latency_tracker.h
+++ b/content/browser/renderer_host/render_widget_host_latency_tracker.h
@@ -8,6 +8,7 @@
#include <vector>
#include "base/basictypes.h"
+#include "cc/base/rolling_time_delta_history.h"
#include "content/browser/renderer_host/event_with_latency_info.h"
#include "content/common/content_export.h"
#include "ui/events/latency_info.h"
@@ -48,6 +49,10 @@ class CONTENT_EXPORT RenderWidgetHostLatencyTracker {
// Called when the RenderWidgetHost receives a swap update from the GPU.
void OnFrameSwapped(const ui::LatencyInfo& latency);
+ // Produces an estimate of the time between browser composite and GPU swap,
+ // as informed by historical latency values.
+ base::TimeDelta GetEstimatedBrowserCompositeTime() const;
+
// WebInputEvent coordinates are in DPIs, while LatencyInfo expects
// coordinates in device pixels.
void set_device_scale_factor(float device_scale_factor) {
@@ -62,6 +67,7 @@ class CONTENT_EXPORT RenderWidgetHostLatencyTracker {
int64 last_event_id_;
int64 latency_component_id_;
float device_scale_factor_;
+ cc::RollingTimeDeltaHistory browser_composite_latency_history_;
DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostLatencyTracker);
};

Powered by Google App Engine
This is Rietveld 408576698