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

Unified Diff: gpu/ipc/service/pass_through_image_transport_surface.cc

Issue 2888993002: Do glFinish before sending snapshot latency info to browser (Closed)
Patch Set: add current tests Created 3 years, 7 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 | « gpu/ipc/service/direct_composition_surface_win.cc ('k') | ui/gl/gl_surface.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/ipc/service/pass_through_image_transport_surface.cc
diff --git a/gpu/ipc/service/pass_through_image_transport_surface.cc b/gpu/ipc/service/pass_through_image_transport_surface.cc
index a8e7cbcdce21f952ec332094e0a35a01e839d326..2af467e1049cc92f2dac5c11d482c74c3ca07b0f 100644
--- a/gpu/ipc/service/pass_through_image_transport_surface.cc
+++ b/gpu/ipc/service/pass_through_image_transport_surface.cc
@@ -202,11 +202,16 @@ void PassThroughImageTransportSurface::FinishSwapBuffers(
std::unique_ptr<std::vector<ui::LatencyInfo>> latency_info,
gfx::SwapResult result) {
base::TimeTicks swap_ack_time = base::TimeTicks::Now();
+ bool has_browser_snapshot_request = false;
for (auto& latency : *latency_info) {
latency.AddLatencyNumberWithTimestamp(
ui::INPUT_EVENT_LATENCY_TERMINATED_FRAME_SWAP_COMPONENT, 0, 0,
swap_ack_time, 1);
+ has_browser_snapshot_request |= latency.FindLatency(
+ ui::BROWSER_SNAPSHOT_FRAME_NUMBER_COMPONENT, nullptr);
}
+ if (has_browser_snapshot_request)
+ WaitForSnapshotRendering();
if (delegate_) {
SwapBuffersCompleteParams params;
« no previous file with comments | « gpu/ipc/service/direct_composition_surface_win.cc ('k') | ui/gl/gl_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698