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

Unified Diff: content/browser/compositor/software_browser_compositor_output_surface.cc

Issue 918883002: Change input latency result to depend on start of GPU swap (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cleanup RWHLT Created 5 years, 10 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/compositor/software_browser_compositor_output_surface.cc
diff --git a/content/browser/compositor/software_browser_compositor_output_surface.cc b/content/browser/compositor/software_browser_compositor_output_surface.cc
index 671d8134b989ab5cbee65ad23e7c596f942c46f9..d5643a145a85b1610eeb0fbe16f3e262e8d0e8a7 100644
--- a/content/browser/compositor/software_browser_compositor_output_surface.cc
+++ b/content/browser/compositor/software_browser_compositor_output_surface.cc
@@ -34,9 +34,13 @@ SoftwareBrowserCompositorOutputSurface::
void SoftwareBrowserCompositorOutputSurface::SwapBuffers(
cc::CompositorFrame* frame) {
- for (size_t i = 0; i < frame->metadata.latency_info.size(); i++) {
- frame->metadata.latency_info[i].AddLatencyNumber(
- ui::INPUT_EVENT_LATENCY_TERMINATED_FRAME_SWAP_COMPONENT, 0, 0);
+ base::TimeTicks swap_time = base::TimeTicks::Now();
+ for (auto& latency : frame->metadata.latency_info) {
+ latency.AddLatencyNumberWithTimestamp(
+ ui::INPUT_EVENT_GPU_SWAP_BUFFER_COMPONENT, 0, 0, swap_time, 1);
+ latency.AddLatencyNumberWithTimestamp(
+ ui::INPUT_EVENT_LATENCY_TERMINATED_FRAME_SWAP_COMPONENT, 0, 0,
+ swap_time, 1);
}
base::MessageLoop::current()->PostTask(
FROM_HERE,

Powered by Google App Engine
This is Rietveld 408576698