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

Unified Diff: content/common/gpu/image_transport_surface_overlay_mac.mm

Issue 1416493010: Clean up Mac swap acknowledgement code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update latency info Created 5 years, 2 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 | « content/common/gpu/gpu_messages.h ('k') | ui/accelerated_widget_mac/accelerated_widget_mac.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/image_transport_surface_overlay_mac.mm
diff --git a/content/common/gpu/image_transport_surface_overlay_mac.mm b/content/common/gpu/image_transport_surface_overlay_mac.mm
index 81dcf54b957014c10268a28f2048f75c0fab1de1..11f90cbc12b1136589a28f79d5c79aba01c9b0cf 100644
--- a/content/common/gpu/image_transport_surface_overlay_mac.mm
+++ b/content/common/gpu/image_transport_surface_overlay_mac.mm
@@ -382,6 +382,16 @@ void ImageTransportSurfaceOverlayMac::DisplayFirstPendingSwapImmediately() {
swap->overlay_planes.clear();
}
+ // Update the latency info to reflect the swap time.
+ base::TimeTicks swap_time = base::TimeTicks::Now();
+ for (auto latency_info : swap->latency_info) {
+ latency_info.AddLatencyNumberWithTimestamp(
+ ui::INPUT_EVENT_GPU_SWAP_BUFFER_COMPONENT, 0, 0, swap_time, 1);
+ latency_info.AddLatencyNumberWithTimestamp(
+ ui::INPUT_EVENT_LATENCY_TERMINATED_FRAME_SWAP_COMPONENT, 0, 0,
+ swap_time, 1);
+ }
+
// Send acknowledgement to the browser.
GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params params;
if (use_remote_layer_api_) {
« no previous file with comments | « content/common/gpu/gpu_messages.h ('k') | ui/accelerated_widget_mac/accelerated_widget_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698