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

Unified Diff: services/ui/surfaces/display_output_surface.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 | « services/ui/surfaces/display_output_surface.h ('k') | ui/latency/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/surfaces/display_output_surface.cc
diff --git a/services/ui/surfaces/display_output_surface.cc b/services/ui/surfaces/display_output_surface.cc
index 85ece68dd7dfaa9e5d9c8c295e188d26eab6ab94..9acdad4fc330cef646f43b41fdab2f6e472e2f9d 100644
--- a/services/ui/surfaces/display_output_surface.cc
+++ b/services/ui/surfaces/display_output_surface.cc
@@ -79,6 +79,10 @@ void DisplayOutputSurface::Reshape(const gfx::Size& size,
void DisplayOutputSurface::SwapBuffers(cc::OutputSurfaceFrame frame) {
DCHECK(context_provider_);
+
+ if (frame.latency_info.size() > 0)
+ context_provider_->ContextSupport()->AddLatencyInfo(frame.latency_info);
+
set_draw_rectangle_for_frame_ = false;
if (frame.sub_buffer_rect) {
context_provider_->ContextSupport()->PartialSwapBuffers(
@@ -123,9 +127,13 @@ void DisplayOutputSurface::DidReceiveSwapBuffersAck(gfx::SwapResult result) {
}
void DisplayOutputSurface::OnGpuSwapBuffersCompleted(
- const std::vector<ui::LatencyInfo>& latency_info,
+ const std::vector<LatencyInfo>& latency_info,
gfx::SwapResult result,
const gpu::GpuProcessHostedCALayerTreeParamsMac* params_mac) {
+ for (const auto& latency : latency_info) {
+ if (latency.latency_components().size() > 0)
+ latency_tracker_.OnGpuSwapBuffersCompleted(latency);
+ }
DidReceiveSwapBuffersAck(result);
}
« no previous file with comments | « services/ui/surfaces/display_output_surface.h ('k') | ui/latency/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698