Chromium Code Reviews| Index: cc/trees/layer_tree_host_impl.cc |
| diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc |
| index bfa05e39fa1d0f480db280aa7fe9a21f413508bc..0adf8e45fa20901e51f497b04d811487094bbab8 100644 |
| --- a/cc/trees/layer_tree_host_impl.cc |
| +++ b/cc/trees/layer_tree_host_impl.cc |
| @@ -875,6 +875,8 @@ bool LayerTreeHostImpl::PrepareToDraw(FrameData* frame, |
| if (!CalculateRenderPasses(frame)) |
| return false; |
| + frame->latency_info = active_tree_->GetLatencyInfo(); |
| + |
| // If we return true, then we expect DrawLayers() to be called before this |
| // function is called again. |
| return true; |
| @@ -1019,6 +1021,7 @@ CompositorFrameMetadata LayerTreeHostImpl::MakeCompositorFrameMetadata() const { |
| return metadata; |
| metadata.root_scroll_offset = RootScrollLayer()->TotalScrollOffset(); |
| + metadata.latency_info = active_tree_->GetLatencyInfo(); |
| return metadata; |
| } |
| @@ -1118,7 +1121,9 @@ const RendererCapabilities& LayerTreeHostImpl::GetRendererCapabilities() const { |
| bool LayerTreeHostImpl::SwapBuffers(const LayerTreeHostImpl::FrameData& frame) { |
| if (frame.has_no_damage) |
| return false; |
| - return renderer_->SwapBuffers(); |
| + bool result = renderer_->SwapBuffers(frame.latency_info); |
| + active_tree_->ClearLatencyInfo(); |
|
jamesr
2013/04/19 01:25:38
do we want to clear the latency info if the swap f
|
| + return result; |
| } |
| void LayerTreeHostImpl::EnableVSyncNotification(bool enable) { |