Commit 30508e5a authored by Philip Rogers's avatar Philip Rogers Committed by Commit Bot

Exclude the heads up display (hud) layer from inspector 3d layers view

The heads up display (hud) layer is used to show layer overlay
information such as the fps meter and repaint rects. This layer should
be excluded from the 3d layers view. This code has not been implemented
behind IsInspectorLayer because the hud layer is used for more than just
the inspector, such as when --show-paint-rects is used.

This has been tested manually by ensuring no extra layer is present.

Bug: 1015918
Change-Id: I044ad1c7dc61385bdeb0fae916c7515dbd8aee4b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1869820Reviewed-by: default avatarXianzhu Wang <wangxianzhu@chromium.org>
Commit-Queue: Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#707875}
parent 70abac55
...@@ -1519,6 +1519,10 @@ void LayerTreeHost::UpdateHudLayer(bool show_hud_info) { ...@@ -1519,6 +1519,10 @@ void LayerTreeHost::UpdateHudLayer(bool show_hud_info) {
} }
} }
bool LayerTreeHost::is_hud_layer(const Layer* layer) const {
return hud_layer() == layer;
}
void LayerTreeHost::SetNeedsFullTreeSync() { void LayerTreeHost::SetNeedsFullTreeSync() {
needs_full_tree_sync_ = true; needs_full_tree_sync_ = true;
property_trees_.needs_rebuild = true; property_trees_.needs_rebuild = true;
......
...@@ -510,6 +510,7 @@ class CC_EXPORT LayerTreeHost : public MutatorHostClient { ...@@ -510,6 +510,7 @@ class CC_EXPORT LayerTreeHost : public MutatorHostClient {
// position. If a HUD layer exists but is no longer needed, it is destroyed. // position. If a HUD layer exists but is no longer needed, it is destroyed.
void UpdateHudLayer(bool show_hud_info); void UpdateHudLayer(bool show_hud_info);
HeadsUpDisplayLayer* hud_layer() const { return hud_layer_.get(); } HeadsUpDisplayLayer* hud_layer() const { return hud_layer_.get(); }
bool is_hud_layer(const Layer*) const;
virtual void SetNeedsFullTreeSync(); virtual void SetNeedsFullTreeSync();
bool needs_full_tree_sync() const { return needs_full_tree_sync_; } bool needs_full_tree_sync() const { return needs_full_tree_sync_; }
......
...@@ -320,6 +320,8 @@ void InspectorLayerTreeAgent::GatherLayers( ...@@ -320,6 +320,8 @@ void InspectorLayerTreeAgent::GatherLayers(
int scrolling_layer_id) { int scrolling_layer_id) {
if (client_->IsInspectorLayer(layer)) if (client_->IsInspectorLayer(layer))
return; return;
if (layer->layer_tree_host()->is_hud_layer(layer))
return;
int layer_id = layer->id(); int layer_id = layer->id();
layers->emplace_back(BuildObjectForLayer( layers->emplace_back(BuildObjectForLayer(
RootLayer(), layer, RootLayer(), layer,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment