New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 718288 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 810037
Owner: ----
Closed: Feb 2018
Cc:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 3
Type: Bug



Sign in to add a comment

Get RenderWidgetHostImpl::GetSnapshotFromBrowser working with Mus

Project Member Reported by mfomitchev@chromium.org, May 4 2017

Issue description

TL;DR:

RenderWidgetHostImpl::GetSnapshotFromBrowser is used exclusively by dev tools' PageHandler::CaptureScreenshot(), which is used by telemetry.

The implementation ab(uses) LatencyInfo and it falls apart in Mus. Basically GetSnapshotFromBrowser() initiates a redraw request, and then uses LatencyInfo to have RenderWidgetHost notified when a GPU Swap occurs for that redraw request. The ideal way of fixing this would be to find another way for RenderWidgetHost to be notified when a GPU Swap happens, and then just to get rid of BROWSER_SNAPSHOT_FRAME_NUMBER_COMPONENT altogether.

==

More info:

There's some awkward plumbing where latency compontent id is set to be (process_id << 32 | routing_id), and then GPU Swap notifications is routed based on this (see RenderWidgetHostImpl::OnGpuSwapBuffersCompleted). There's some discussion regarding this being hacky in the original CL: https://codereview.chromium.org/23694031 (see piman's and jamesr's comments). 

Reasons this falls apart in Mus:
1. The actual snapshot is taken in RenderWidgetHostImpl::OnGpuSwapBuffersCompletedInternal, which won't be called in Mus.
2. Deducing which RenderWidgetHost requested the screenshot is done based on latency component id (see RenderWidgetHostImpl::OnGpuSwapBuffersCompleted), which is set in RenderWidgetHostLatencyTracker::AddLatencyInfoComponentIds, called from RenderWidgetHostLatencyTracker::OnSwapCompositorFrame, which also won't be called in Mus. 
 

Comment 1 by sky@chromium.org, Jun 8 2017

Blocking: 731255
Blocking: -731255 732572
Owner: ----
Blocking: -732572
Mergedinto: 810037
Status: Duplicate (was: Available)

Sign in to add a comment