| Index: content/browser/renderer_host/render_widget_host_view_aura.cc
|
| diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
|
| index 49ef41bdbf3c2fd5507f79ae94ec132b5bd4c33c..6d429651784d9aff3ca7d4ae85ba315fb517b3aa 100644
|
| --- a/content/browser/renderer_host/render_widget_host_view_aura.cc
|
| +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
|
| @@ -889,6 +889,14 @@ void RenderWidgetHostViewAura::AcceleratedSurfaceBuffersSwapped(
|
| if (compositor) {
|
| gfx::Size surface_size = ConvertSizeToDIP(this, params_in_pixel.size);
|
| window_->SchedulePaintInRect(gfx::Rect(surface_size));
|
| +
|
| + FrameLatency frame_latency;
|
| + frame_latency.latency_info = params_in_pixel.latency_info;
|
| + frame_latency.latency_info.browserMainFrameNumber =
|
| + compositor->SetInputNumber(frame_latency.latency_info.inputNumber);
|
| + frame_latency.gpu_host_id = gpu_host_id;
|
| + frame_latency.route_id = params_in_pixel.route_id;
|
| + frame_queue_.push(frame_latency);
|
| }
|
|
|
| SwapBuffersCompleted(ack_params);
|
| @@ -950,6 +958,14 @@ void RenderWidgetHostViewAura::AcceleratedSurfacePostSubBuffer(
|
| rect_to_paint.Inset(-1, -1);
|
| rect_to_paint.Intersect(window_->bounds());
|
|
|
| + FrameLatency frame_latency;
|
| + frame_latency.latency_info = params_in_pixel.latency_info;
|
| + frame_latency.latency_info.browserMainFrameNumber =
|
| + compositor->SetInputNumber(frame_latency.latency_info.inputNumber);
|
| + frame_latency.gpu_host_id = gpu_host_id;
|
| + frame_latency.route_id = params_in_pixel.route_id;
|
| + frame_queue_.push(frame_latency);
|
| +
|
| window_->SchedulePaintInRect(rect_to_paint);
|
| }
|
|
|
| @@ -1755,6 +1771,28 @@ void RenderWidgetHostViewAura::OnCompositingLockStateChanged(
|
| }
|
| }
|
|
|
| +void RenderWidgetHostViewAura::OnReceivedLatencyInfo(
|
| + ui::Compositor* compositor,
|
| + const cc::LatencyInfo& latency_info) {
|
| + while (!frame_queue_.empty()) {
|
| + const FrameLatency& frame_latency = frame_queue_.front();
|
| + if (latency_info.rendererMainFrameNumber <
|
| + frame_latency.latency_info.browserMainFrameNumber)
|
| + break;
|
| +
|
| + cc::LatencyInfo real_latency_info = frame_latency.latency_info;
|
| + real_latency_info.browserMainFrameNumber =
|
| + latency_info.rendererMainFrameNumber;
|
| + real_latency_info.browserImplFrameNumber =
|
| + latency_info.rendererImplFrameNumber;
|
| + real_latency_info.swapTimestamp = latency_info.swapTimestamp;
|
| + RenderWidgetHostImpl::NotifyFrameDisplayed(frame_latency.route_id,
|
| + frame_latency.gpu_host_id,
|
| + real_latency_info);
|
| + frame_queue_.pop();
|
| + }
|
| +}
|
| +
|
| ////////////////////////////////////////////////////////////////////////////////
|
| // RenderWidgetHostViewAura, ImageTransportFactoryObserver implementation:
|
|
|
|
|