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

Issue 810128 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 1
Type: Bug


Sign in to add a comment

Stop using Surface hit testing in the content layer

Project Member Reported by kenrb@chromium.org, Feb 7 2018

Issue description

This is a tracking bug for the work needed to switch browser process input event hit testing from the DrawQuad-based hit testing currently done (via SurfaceHittest) to the HitTestRegion-based hit testing system in development (via HitTestQuery). This would mostly remove the high latency penalty incurred from querying the renderer process on all events that are over an OOPIF.

This is not dependent on the Viz display compositor.

The plan is to do a Finch trial of --use-viz-hit-test in M66, and make it the default hit test path for all Site Isolation modes in M67.
 
Blockedon: 810121 732394
Cc: sunxd@chromium.org
Thanks for filing this tracking bug!

We can stop using SurfaceHittest (hopefully in M66?) without 732394, but I thnk we need that to have better performance compared to M65. Adding that as a blocker too.
Blockedon: 732392

Comment 3 by kenrb@chromium.org, Feb 7 2018

#1: The Surface hit testing is necessary until we have at least reasonably correct HitTestRegions available. It lets us determine if an event might hit an OOPIF, and we only query the renderer process if that is the case. Otherwise we incur the latency penalty for all mouse or touch events on the page, which might be what you mean by 'better performance'.
Yea there are two versions:
1. Viz hit-test (via HitTestQuery instead of SurfaceHitTest) with hit-test data coming from draw-quads.
2. Viz hit-test (via HitTestQuery instead of SurfaceHitTest) with hit-test data coming from cc surface-layer (732392).

Version 1 should give us the same performance as M65, in which we only go for slow-path when it's an OOPIF. I thought that we want to at least have version 1 so that we don't have to go through SurfaceHittest anymore in M66?
Project Member

Comment 5 by bugdroid1@chromium.org, Feb 12 2018

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

commit 4bbc618c386dbc3923f3d2f7b5fb1da548aca54d
Author: Ria Jiang <riajiang@chromium.org>
Date: Mon Feb 12 19:02:19 2018

Use two different flags for getting HTD from draw quad or surface layer.

We are using -use-viz-hit-test flag to set the HitTestDataProvider to
use in both draw-quad and surface-layer viz-hit-test versions, so we
still get draw-quad hit-test data when trying to test the surface-layer
version.

This CL separates them to be:
1. --use-viz-hit-test-draw-quad, which turns on viz-hit-test with data
coming from draw quad.
2. --use-viz-hit-test-surface-layer, which turns on viz-hit-test with
data coming from surface layer.

Bug: 810128
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: I76609fe0b51f67a6c45a163dad9e3e1fc5b69766
Reviewed-on: https://chromium-review.googlesource.com/910072
Commit-Queue: Ria Jiang <riajiang@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Gary Klassen <gklassen@chromium.org>
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Reviewed-by: Robert Kroeger <rjkroege@chromium.org>
Cr-Commit-Position: refs/heads/master@{#536148}
[modify] https://crrev.com/4bbc618c386dbc3923f3d2f7b5fb1da548aca54d/components/viz/common/features.cc
[modify] https://crrev.com/4bbc618c386dbc3923f3d2f7b5fb1da548aca54d/components/viz/common/features.h
[modify] https://crrev.com/4bbc618c386dbc3923f3d2f7b5fb1da548aca54d/components/viz/common/switches.cc
[modify] https://crrev.com/4bbc618c386dbc3923f3d2f7b5fb1da548aca54d/components/viz/common/switches.h
[modify] https://crrev.com/4bbc618c386dbc3923f3d2f7b5fb1da548aca54d/content/browser/renderer_host/render_process_host_impl.cc
[modify] https://crrev.com/4bbc618c386dbc3923f3d2f7b5fb1da548aca54d/content/renderer/mus/renderer_window_tree_client.cc
[modify] https://crrev.com/4bbc618c386dbc3923f3d2f7b5fb1da548aca54d/content/renderer/render_thread_impl.cc
[modify] https://crrev.com/4bbc618c386dbc3923f3d2f7b5fb1da548aca54d/services/ui/ws/event_dispatcher_unittest.cc

Project Member

Comment 6 by bugdroid1@chromium.org, Feb 13 2018

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

commit 2805111f35d36b4238ea07757c49b87b12dd3bf2
Author: Ria Jiang <riajiang@chromium.org>
Date: Tue Feb 13 16:38:52 2018

Renderers only set kHitTestAsk to use slow-path targeting for OOPIFs.

Currently, when we create hit-test data for renderers, we only submit
the compositor frame rect and set kHitTestAsk whenever that renderer
*contains* any OOPIF.

This CL changes it to be still submitting the compositor frame rect,
but also submitting hit-test regions for its embedded clients and only
use kHitTestAsk flags (so that we do slow-path targeting) for those
OOPIFs. After RenderWidgetTargeter gets the result, it starts asking
from the root_view [1] so we guarantee correctness for targeting in
this case and have better performance than the previous version.

[1] https://cs.chromium.org/chromium/src/content/browser/renderer_host/render_widget_targeter.cc?type=cs&l=157

Bug: 810128
Test: viz_unittests
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: Id23cb86eea59d9c4c68ff2958cf15e1ca88800bf
Reviewed-on: https://chromium-review.googlesource.com/907686
Commit-Queue: Ria Jiang <riajiang@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Gary Klassen <gklassen@chromium.org>
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Reviewed-by: Robert Kroeger <rjkroege@chromium.org>
Cr-Commit-Position: refs/heads/master@{#536379}
[modify] https://crrev.com/2805111f35d36b4238ea07757c49b87b12dd3bf2/components/viz/client/BUILD.gn
[add] https://crrev.com/2805111f35d36b4238ea07757c49b87b12dd3bf2/components/viz/client/hit_test_data_provider_draw_quad.cc
[add] https://crrev.com/2805111f35d36b4238ea07757c49b87b12dd3bf2/components/viz/client/hit_test_data_provider_draw_quad.h
[rename] https://crrev.com/2805111f35d36b4238ea07757c49b87b12dd3bf2/components/viz/client/hit_test_data_provider_draw_quad_unittest.cc
[delete] https://crrev.com/c870c6df43f54ec6758fb40521460788b744b7a2/components/viz/client/hit_test_data_provider_simple_bounds.cc
[delete] https://crrev.com/c870c6df43f54ec6758fb40521460788b744b7a2/components/viz/client/hit_test_data_provider_simple_bounds.h
[modify] https://crrev.com/2805111f35d36b4238ea07757c49b87b12dd3bf2/content/renderer/mus/renderer_window_tree_client.cc
[modify] https://crrev.com/2805111f35d36b4238ea07757c49b87b12dd3bf2/content/renderer/render_thread_impl.cc

Blockedon: 811928
Blockedon: 814463
Project Member

Comment 9 by bugdroid1@chromium.org, Feb 23 2018

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

commit 0017fa50e4a796def32fee0d73bf0237b5e6178a
Author: Ria Jiang <riajiang@chromium.org>
Date: Fri Feb 23 20:39:44 2018

Get the offset from the current RenderWidgetHostViewBase to the root.

This CL adds RenderWidgetHostViewBase::GetOffsetFromRootSurface() and
implements it on different platforms. This is necessary to use the
correct coordinate-space for Viz hit-test.

Bug: 810128
Test: https://chromium-review.googlesource.com/c/chromium/src/+/919260
Change-Id: I01903dc92bc00bcfa19a3870e26e4f73ea7bff37
Reviewed-on: https://chromium-review.googlesource.com/930701
Reviewed-by: Bo <boliu@chromium.org>
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Commit-Queue: Ria Jiang <riajiang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#538884}
[modify] https://crrev.com/0017fa50e4a796def32fee0d73bf0237b5e6178a/content/browser/renderer_host/render_widget_host_input_event_router.cc
[modify] https://crrev.com/0017fa50e4a796def32fee0d73bf0237b5e6178a/content/browser/renderer_host/render_widget_host_view_android.cc
[modify] https://crrev.com/0017fa50e4a796def32fee0d73bf0237b5e6178a/content/browser/renderer_host/render_widget_host_view_android.h
[modify] https://crrev.com/0017fa50e4a796def32fee0d73bf0237b5e6178a/content/browser/renderer_host/render_widget_host_view_aura.cc
[modify] https://crrev.com/0017fa50e4a796def32fee0d73bf0237b5e6178a/content/browser/renderer_host/render_widget_host_view_aura.h
[modify] https://crrev.com/0017fa50e4a796def32fee0d73bf0237b5e6178a/content/browser/renderer_host/render_widget_host_view_base.h
[modify] https://crrev.com/0017fa50e4a796def32fee0d73bf0237b5e6178a/content/browser/renderer_host/render_widget_host_view_child_frame.cc
[modify] https://crrev.com/0017fa50e4a796def32fee0d73bf0237b5e6178a/content/browser/renderer_host/render_widget_host_view_child_frame.h
[modify] https://crrev.com/0017fa50e4a796def32fee0d73bf0237b5e6178a/content/browser/renderer_host/render_widget_host_view_mac.h
[modify] https://crrev.com/0017fa50e4a796def32fee0d73bf0237b5e6178a/content/browser/renderer_host/render_widget_host_view_mac.mm
[modify] https://crrev.com/0017fa50e4a796def32fee0d73bf0237b5e6178a/content/test/test_render_view_host.cc
[modify] https://crrev.com/0017fa50e4a796def32fee0d73bf0237b5e6178a/content/test/test_render_view_host.h

Sign in to add a comment