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

Unified Diff: content/browser/renderer_host/render_widget_host_impl.cc

Issue 2780373002: Use observer pattern instead of sniffing SwapCompositorFrame IPC (Closed)
Patch Set: Addressed comments Created 3 years, 8 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_impl.cc
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index 5caf7eab7947f091d5262799123294bcac397bac..e047cd495eaaafa35fcaedebb4d379da60947bd6 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -2631,6 +2631,8 @@ void RenderWidgetHostImpl::SubmitCompositorFrame(
std::vector<ui::LatencyInfo>().swap(frame.metadata.latency_info);
}
+ last_frame_metadata_ = frame.metadata.Clone();
+
latency_tracker_.OnSwapCompositorFrame(&frame.metadata.latency_info);
bool is_mobile_optimized = IsMobileOptimizedFrame(frame.metadata);
@@ -2659,6 +2661,9 @@ void RenderWidgetHostImpl::SubmitCompositorFrame(
new_content_rendering_timeout_->IsRunning()) {
new_content_rendering_timeout_->Stop();
}
+
+ if (delegate_)
+ delegate_->DidReceiveCompositorFrame();
}
} // namespace content
« no previous file with comments | « content/browser/renderer_host/render_widget_host_impl.h ('k') | content/browser/web_contents/web_contents_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698