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

Issue 760197 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Sep 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

It might be useful to label FrameSinkIds.

Project Member Reported by fsam...@chromium.org, Aug 29 2017

Issue description

FrameSinkIds are just two integers and are fairly meaningless when debugging without additional printing to see what generated the ID. Now that all clients use HostFrameSinkManager::RegisterFrameSinkId, perhaps we can introduce an additional parameter that takes in a debug name.

That name can be used when printing out the surface hierarchy so we know
which clients are contributing which surfaces. This could be useful for both hit testing and compositing folks.
 
HostFrameSinkManager::RegisterFrameSInkId => FrameSinkManagerImpl::RegisterFrameSinkId and add it to FrameSinkData.

SurfaceManager::SurfaceReferencesToStringImpl can be updated to display the FrameSinkId's label. The tricky part is SurfaceManager doesn't know about FrameSinkManager, so maybe you can add something to SurfaceClient? SurfaceClient::GetFrameSinkLabel()?

Comment 3 by varkha@chromium.org, Aug 29 2017

For Aura windows' IDs could it resolve by default to Window::name() which is usually plumbed through with some debugging name?

Comment 4 by sadrul@chromium.org, Aug 29 2017

I believe WindowTree knows the name of the client. Can it propagate that to the CompositorFrameSinkImpl it creates? That would give us the name of the client, which I think would be sufficient here?
Owner: staraz@chromium.org
Status: Assigned (was: Untriaged)
Yea, ServerWindow calls HostFrameSinkManager::RegisterFrameSinkId. Is the name stored in properties? If so we can pass it along to RegisterFrameSinkId at construction time?
Do you mean WindowTree::name()? Last time I tried to use it to debug, it was empty (I didn't look into it too much to see if it's empty for all clients)

Comment 7 by staraz@chromium.org, Aug 31 2017

Status: Started (was: Assigned)

Comment 8 by staraz@chromium.org, Aug 31 2017

I don't think FrameSinkData is a good place to store the label. FrameSinkData is owned by HostFrameSinkManager. FrameSinkManagerImpl cannot talk to HostFrameSinkManager.

FrameSinkManagerImpl::RegisterFrameSink calls SurfaceManager::RegisterFrameSinkId. Can we let SurfaceManager hold a map from FrameSinkIds to labels? We don't need to plumb the label through SurfaceClient this way.
Project Member

Comment 9 by bugdroid1@chromium.org, Sep 7 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/43a5428227c1848aca58f3bef7a64e8c3e62f080

commit 43a5428227c1848aca58f3bef7a64e8c3e62f080
Author: Alex Zhang <staraz@chromium.org>
Date: Thu Sep 07 21:16:10 2017

Label FrameSinkIds for Debugging

Add HostFrameSinkManager::SetFrameSinkDebugLabel. The label is stored
in a base::flat_map keyed by its FrameSinkId in SurfaceManager.

SurfaceManager::SurfaceReferencesToString adds the label of a Surface
after its SurfaceId to its return value.

I put the map in SurfaceManager so that we don't have to go through
SurfaceClient to obtain the labels.

The label is used for debugging purposes only. It can be used when
printing out the surface hierarchy so we know which clients are
contributing which surfaces.

TBR=michaelbai@chromium.org

Bug:  760197 
Change-Id: I4da35b272db313bb436fcbe9c20c6e3d7567e210
Reviewed-on: https://chromium-review.googlesource.com/646641
Commit-Queue: Xingyu Zhang <staraz@chromium.org>
Reviewed-by: Xingyu Zhang <staraz@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Fady Samuel <fsamuel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#500378}
[modify] https://crrev.com/43a5428227c1848aca58f3bef7a64e8c3e62f080/android_webview/browser/hardware_renderer.cc
[modify] https://crrev.com/43a5428227c1848aca58f3bef7a64e8c3e62f080/components/viz/host/host_frame_sink_manager.cc
[modify] https://crrev.com/43a5428227c1848aca58f3bef7a64e8c3e62f080/components/viz/host/host_frame_sink_manager.h
[modify] https://crrev.com/43a5428227c1848aca58f3bef7a64e8c3e62f080/components/viz/host/host_frame_sink_manager_unittests.cc
[modify] https://crrev.com/43a5428227c1848aca58f3bef7a64e8c3e62f080/components/viz/service/frame_sinks/compositor_frame_sink_support_unittest.cc
[modify] https://crrev.com/43a5428227c1848aca58f3bef7a64e8c3e62f080/components/viz/service/frame_sinks/frame_sink_manager_impl.cc
[modify] https://crrev.com/43a5428227c1848aca58f3bef7a64e8c3e62f080/components/viz/service/frame_sinks/frame_sink_manager_impl.h
[modify] https://crrev.com/43a5428227c1848aca58f3bef7a64e8c3e62f080/components/viz/service/surfaces/surface.cc
[modify] https://crrev.com/43a5428227c1848aca58f3bef7a64e8c3e62f080/components/viz/service/surfaces/surface.h
[modify] https://crrev.com/43a5428227c1848aca58f3bef7a64e8c3e62f080/components/viz/service/surfaces/surface_manager.cc
[modify] https://crrev.com/43a5428227c1848aca58f3bef7a64e8c3e62f080/components/viz/service/surfaces/surface_manager.h
[modify] https://crrev.com/43a5428227c1848aca58f3bef7a64e8c3e62f080/components/viz/test/test_frame_sink_manager.h
[modify] https://crrev.com/43a5428227c1848aca58f3bef7a64e8c3e62f080/content/browser/renderer_host/compositor_impl_android.cc
[modify] https://crrev.com/43a5428227c1848aca58f3bef7a64e8c3e62f080/content/browser/renderer_host/delegated_frame_host.cc
[modify] https://crrev.com/43a5428227c1848aca58f3bef7a64e8c3e62f080/content/browser/renderer_host/offscreen_canvas_surface_impl.cc
[modify] https://crrev.com/43a5428227c1848aca58f3bef7a64e8c3e62f080/content/browser/renderer_host/render_widget_host_view_child_frame.cc
[modify] https://crrev.com/43a5428227c1848aca58f3bef7a64e8c3e62f080/content/test/test_render_view_host.cc
[modify] https://crrev.com/43a5428227c1848aca58f3bef7a64e8c3e62f080/services/ui/ws/server_window.cc
[modify] https://crrev.com/43a5428227c1848aca58f3bef7a64e8c3e62f080/services/viz/privileged/interfaces/compositing/frame_sink_manager.mojom
[modify] https://crrev.com/43a5428227c1848aca58f3bef7a64e8c3e62f080/ui/android/delegated_frame_host_android.cc
[modify] https://crrev.com/43a5428227c1848aca58f3bef7a64e8c3e62f080/ui/aura/local/layer_tree_frame_sink_local.cc
[modify] https://crrev.com/43a5428227c1848aca58f3bef7a64e8c3e62f080/ui/aura/local/layer_tree_frame_sink_local.h
[modify] https://crrev.com/43a5428227c1848aca58f3bef7a64e8c3e62f080/ui/aura/local/window_port_local.cc
[modify] https://crrev.com/43a5428227c1848aca58f3bef7a64e8c3e62f080/ui/compositor/compositor.cc

Status: Fixed (was: Started)
Components: -Internals>Viz Internals>Services>Viz
Migrating from Internals>Viz to Internals>Services>Viz.

Sign in to add a comment