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

Unified Diff: cc/surfaces/surface_factory.cc

Issue 2806163004: Plumbing input event latency reporting through Mus GPU. (Closed)
Patch Set: Inline LatencyTracker in DIsplayOutputService. 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
« no previous file with comments | « cc/surfaces/compositor_frame_sink_support_unittest.cc ('k') | cc/test/test_context_support.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/surface_factory.cc
diff --git a/cc/surfaces/surface_factory.cc b/cc/surfaces/surface_factory.cc
index f6a6e0ec0f26f0f0ff75070cc33f9038a1073069..659ed06ad828227bad8798f2d586e497d31e97bc 100644
--- a/cc/surfaces/surface_factory.cc
+++ b/cc/surfaces/surface_factory.cc
@@ -47,6 +47,14 @@ void SurfaceFactory::SubmitCompositorFrame(
const DrawCallback& callback) {
TRACE_EVENT0("cc", "SurfaceFactory::SubmitCompositorFrame");
DCHECK(local_surface_id.is_valid());
+
+ for (ui::LatencyInfo& latency : frame.metadata.latency_info) {
+ if (latency.latency_components().size() > 0) {
+ latency.AddLatencyNumber(ui::DISPLAY_COMPOSITOR_RECEIVED_FRAME_COMPONENT,
+ 0, 0);
+ }
+ }
+
std::unique_ptr<Surface> surface;
bool create_new_surface =
(!current_surface_ ||
« no previous file with comments | « cc/surfaces/compositor_frame_sink_support_unittest.cc ('k') | cc/test/test_context_support.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698