From 545a72d3f37fa15844cb08d83db7cca672b79cd0 Mon Sep 17 00:00:00 2001
From: orglofch <orglofch@chromium.org>
Date: Thu, 2 Oct 2014 16:39:56 -0700
Subject: Add new latency_info for tracking browser composite time.

RenderWidgetHostImpl maintains a rolling estimate of composite times
to be passed to RenderWidgetHostViewAndroid::SendBeginFrame to
improve deadline estimate.

Latency info is still currently tied to input events. Future patch
should make the latency_info update on a per frame basis.

BUG=414365

Review URL: https://codereview.chromium.org/577273003

Cr-Commit-Position: refs/heads/master@{#297950}
---
 content/common/gpu/image_transport_surface.cc | 4 ++++
 1 file changed, 4 insertions(+)

(limited to 'content/common/gpu')

diff --git a/content/common/gpu/image_transport_surface.cc b/content/common/gpu/image_transport_surface.cc
index 21581af..45c1c83 100644
--- a/content/common/gpu/image_transport_surface.cc
+++ b/content/common/gpu/image_transport_surface.cc
@@ -226,6 +226,10 @@ bool PassThroughImageTransportSurface::SwapBuffers() {
   // GetVsyncValues before SwapBuffers to work around Mali driver bug:
   // crbug.com/223558.
   SendVSyncUpdateIfAvailable();
+  for (size_t i = 0; i < latency_info_.size(); ++i) {
+    latency_info_[i].AddLatencyNumber(
+        ui::INPUT_EVENT_GPU_SWAP_BUFFER_COMPONENT, 0, 0);
+  }
   bool result = gfx::GLSurfaceAdapter::SwapBuffers();
   for (size_t i = 0; i < latency_info_.size(); i++) {
     latency_info_[i].AddLatencyNumber(
-- 
cgit v1.1