New issue
Advanced search Search tips
Starred by 1 user

Issue metadata

Status: Started
Owner:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug

Blocked on: View detail
issue 913985
issue 924294



Sign in to add a comment
link

Issue 901882: Improve v2 viz hit testing

Reported by sunxd@chromium.org, Nov 5 Project Member

Issue description

Despite the finch of v2, we can still see around 5% hit testing instances fall into slow path. We need to investigate and improve the performance.
 

Comment 1 by bugdroid1@chromium.org, Nov 14

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/567005d56ccb3072bd723c3422997d0c42546b69

commit 567005d56ccb3072bd723c3422997d0c42546b69
Author: Xianda Sun <sunxd@chromium.org>
Date: Wed Nov 14 15:32:24 2018

Add viz hit test surface layer metrics

With cc generated hit test data, viz hit test surface layer is capable
of doing synchronous hit testing under some non-trivial cases. Despite
that it still has to do slow path hit testing under some circumstances.
This patch added a metric to record the reasons of slow path hit test.

Bug: 901882
Change-Id: Icaff4c9ba01add4dfc4620b5d7e28fd85683dba9
Reviewed-on: https://chromium-review.googlesource.com/c/1318078
Reviewed-by: Ria Jiang <riajiang@chromium.org>
Reviewed-by: Robert Flack <flackr@chromium.org>
Reviewed-by: Jesse Doherty <jwd@chromium.org>
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Commit-Queue: Xianda Sun <sunxd@chromium.org>
Cr-Commit-Position: refs/heads/master@{#607985}
[modify] https://crrev.com/567005d56ccb3072bd723c3422997d0c42546b69/cc/trees/layer_tree_host_impl.cc
[modify] https://crrev.com/567005d56ccb3072bd723c3422997d0c42546b69/components/viz/client/hit_test_data_provider_draw_quad.cc
[modify] https://crrev.com/567005d56ccb3072bd723c3422997d0c42546b69/components/viz/common/hit_test/aggregated_hit_test_region.h
[modify] https://crrev.com/567005d56ccb3072bd723c3422997d0c42546b69/components/viz/common/hit_test/hit_test_region_list.h
[modify] https://crrev.com/567005d56ccb3072bd723c3422997d0c42546b69/components/viz/host/hit_test/hit_test_query.cc
[modify] https://crrev.com/567005d56ccb3072bd723c3422997d0c42546b69/components/viz/host/hit_test/hit_test_query.h
[modify] https://crrev.com/567005d56ccb3072bd723c3422997d0c42546b69/components/viz/host/hit_test/hit_test_query_fuzzer.cc
[modify] https://crrev.com/567005d56ccb3072bd723c3422997d0c42546b69/components/viz/host/hit_test/hit_test_query_unittest.cc
[modify] https://crrev.com/567005d56ccb3072bd723c3422997d0c42546b69/components/viz/service/hit_test/hit_test_aggregator.cc
[modify] https://crrev.com/567005d56ccb3072bd723c3422997d0c42546b69/components/viz/service/hit_test/hit_test_aggregator.h
[modify] https://crrev.com/567005d56ccb3072bd723c3422997d0c42546b69/content/browser/renderer_host/render_widget_host_input_event_router_unittest.cc
[modify] https://crrev.com/567005d56ccb3072bd723c3422997d0c42546b69/services/viz/public/cpp/hit_test/aggregated_hit_test_region_struct_traits.cc
[modify] https://crrev.com/567005d56ccb3072bd723c3422997d0c42546b69/services/viz/public/cpp/hit_test/aggregated_hit_test_region_struct_traits.h
[modify] https://crrev.com/567005d56ccb3072bd723c3422997d0c42546b69/services/viz/public/cpp/hit_test/hit_test_region_list_struct_traits.cc
[modify] https://crrev.com/567005d56ccb3072bd723c3422997d0c42546b69/services/viz/public/cpp/hit_test/hit_test_region_list_struct_traits.h
[modify] https://crrev.com/567005d56ccb3072bd723c3422997d0c42546b69/services/viz/public/cpp/hit_test/struct_traits_unittest.cc
[modify] https://crrev.com/567005d56ccb3072bd723c3422997d0c42546b69/services/viz/public/interfaces/hit_test/aggregated_hit_test_region.mojom
[modify] https://crrev.com/567005d56ccb3072bd723c3422997d0c42546b69/services/viz/public/interfaces/hit_test/hit_test_region_list.mojom
[modify] https://crrev.com/567005d56ccb3072bd723c3422997d0c42546b69/tools/metrics/histograms/enums.xml
[modify] https://crrev.com/567005d56ccb3072bd723c3422997d0c42546b69/tools/metrics/histograms/histograms.xml

Comment 2 by bugdroid1@chromium.org, Nov 19

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/813e1d54d7f7bba3d4960be1b38b7d37fe81381e

commit 813e1d54d7f7bba3d4960be1b38b7d37fe81381e
Author: Xianda Sun <sunxd@chromium.org>
Date: Mon Nov 19 21:49:57 2018

Fix async hit test reasons metric bug

This patch fixes a bug that we early return in HitTestQuery at the
presence of kHitTestAsk flag but do not collect asking reasons.

Bug: 901882
Change-Id: Iebc677d9ce9ef7ea739e06a2844c49796ed84a27
Reviewed-on: https://chromium-review.googlesource.com/c/1342048
Reviewed-by: Ria Jiang <riajiang@chromium.org>
Commit-Queue: Xianda Sun <sunxd@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609454}
[modify] https://crrev.com/813e1d54d7f7bba3d4960be1b38b7d37fe81381e/components/viz/host/hit_test/hit_test_query.cc

Comment 3 by bugdroid1@chromium.org, Nov 28

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2e7fdf11ecb0fe2c64f9af9fd77c3c2124675b18

commit 2e7fdf11ecb0fe2c64f9af9fd77c3c2124675b18
Author: Xianda Sun <sunxd@chromium.org>
Date: Wed Nov 28 17:40:04 2018

Use layer tree to generate data when VizHitTestSurfaceLayer is enabled

We previously use other hit test data providers whenever there is one
created, regardless of whether we enable VizHitTestSurfaceLayer or not.

This makes the flag no longer effective in some conditions as we can
create a draw quad hit test data provider arbitrarily sometimes. It
accounts for the async hit testing of approximately 1% of all hit
testing requests when VizHitTestSurfaceLayer is enabled.

This patch makes us use layer tree hit test data when the flag is
enabled.

Bug: 901882
Change-Id: I833b693368721b09e1d2922274d21170a24125d7
Reviewed-on: https://chromium-review.googlesource.com/c/1348949
Commit-Queue: Xianda Sun <sunxd@chromium.org>
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Reviewed-by: Ria Jiang <riajiang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#611757}
[modify] https://crrev.com/2e7fdf11ecb0fe2c64f9af9fd77c3c2124675b18/cc/mojo_embedder/async_layer_tree_frame_sink.cc
[modify] https://crrev.com/2e7fdf11ecb0fe2c64f9af9fd77c3c2124675b18/ui/aura/local/window_port_local.cc
[modify] https://crrev.com/2e7fdf11ecb0fe2c64f9af9fd77c3c2124675b18/ui/aura/mus/window_port_mus.cc
[modify] https://crrev.com/2e7fdf11ecb0fe2c64f9af9fd77c3c2124675b18/ui/compositor/host/host_context_factory_private.cc

Comment 4 by sunxd@chromium.org, Dec 11

Blockedon: 913985

Comment 5 by bugdroid1@chromium.org, Dec 14

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b8b6d56285606a3c20bd158a48739249e289c04d

commit b8b6d56285606a3c20bd158a48739249e289c04d
Author: Xianda Sun <sunxd@chromium.org>
Date: Fri Dec 14 23:54:57 2018

Enable v2 hit testing with VizDisplayCompositor

This patch enables V2 viz hit testing (OOPIF hit testing with cc data)
with VizDisplayCompositor.

Bug: 901882
Change-Id: If8fc1483303e6081e985d02249de9e75959f4420
Reviewed-on: https://chromium-review.googlesource.com/c/1370464
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Reviewed-by: Ria Jiang <riajiang@chromium.org>
Commit-Queue: Xianda Sun <sunxd@chromium.org>
Cr-Commit-Position: refs/heads/master@{#616881}
[modify] https://crrev.com/b8b6d56285606a3c20bd158a48739249e289c04d/components/viz/common/features.cc

Comment 6 by sunxd@chromium.org, Jan 22

Blockedon: 924294

Comment 7 by bugdroid, Jan 23

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/052ae71abd82e18f19f79138c7b5f9e7e5fc9625

commit 052ae71abd82e18f19f79138c7b5f9e7e5fc9625
Author: Xianda Sun <sunxd@chromium.org>
Date: Wed Jan 23 20:29:48 2019

Make Layer::ShouldHitTest respect SetHideLayerAndSubtree

Ui::Layers call SetHideLayerAndSubtree when they become visible or
hidden. But a cc::Layer with hide_layer_and_subtree = true still
draws its content and is considered hit-testable, though not displayed
on the screen.

This patch makes cc hit testing respect hide_layer_and_subtree and do
not hit test a layer if it's drawn but not displayed on screen.

Bug: 901882
Change-Id: I18c9511c18628067dbcb471cd8dfe43a1e3c6426
Reviewed-on: https://chromium-review.googlesource.com/c/1413393
Reviewed-by: weiliangc <weiliangc@chromium.org>
Commit-Queue: Xianda Sun <sunxd@chromium.org>
Cr-Commit-Position: refs/heads/master@{#625335}

Sign in to add a comment