Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(912)

Issue 2908783002: WIP Hittest Component.

Created:
3 years, 7 months ago by gklassen
Modified:
3 years, 5 months ago
Reviewers:
rjkroege, sadrul
CC:
chromium-reviews, riajiang
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

WIP Hittest Component. First step towards a Hittest component to aggregate hittest data from multiple compositor frames and enable efficient hittest queries across processes. Implement HittestData mojo structures. BUG= CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel

Patch Set 1 : rebase #

Total comments: 1

Patch Set 2 : update dependencies and owners #

Patch Set 3 : format #

Total comments: 18

Patch Set 4 : resolve presubmit checks #

Total comments: 3

Patch Set 5 : improvements driven by comments #

Patch Set 6 : Rename to HittestAggregator and create instance from GpuRootCompositorFrameSink #

Patch Set 7 : surface observer and test setup #

Total comments: 61

Patch Set 8 : improvements from reviewer comments #

Total comments: 54

Patch Set 9 : change DisplayHitTestData to POD, change case to HitTest, hook Begin Frame, first unit test works #

Patch Set 10 : hittest -> hit_test #

Patch Set 11 : 2 more tests and the tree works for at least the basic cases #

Patch Set 12 : use frame_sink_id and keep only child definitions in DisplayHitTestData tree #

Patch Set 13 : re-introduce a parent element in the tree for bounds checking #

Patch Set 14 : reviewer comments #

Total comments: 75

Patch Set 15 : updates from reviewer comments and discussion - bounds replaced with explicit regions #

Patch Set 16 : fix z-order in use case tests ( background rects at the back ) #

Total comments: 33

Patch Set 17 : Add unit test for a clipped child with a tab and transparent background #

Patch Set 18 : add transform to tab window test case #

Patch Set 19 : reviewer comments and handling of memory re-allocation #

Total comments: 23

Patch Set 20 : abstract DisplayHitTestData allocation #

Patch Set 21 : improvements based on reviewer comments #

Patch Set 22 : change HitTestFlags to constants so we can mix and match and convert to struct naming convention #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+1560 lines, -2 lines) Patch
M cc/surfaces/display.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M cc/surfaces/surface_aggregator.cc View 1 2 3 4 5 6 1 chunk +3 lines, -1 line 0 comments Download
M cc/surfaces/surface_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +4 lines, -0 lines 0 comments Download
M cc/surfaces/surface_manager.cc View 1 2 3 4 5 6 1 chunk +6 lines, -0 lines 0 comments Download
M cc/surfaces/surface_observer.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +3 lines, -0 lines 0 comments Download
M cc/test/fake_surface_observer.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
A components/viz/base/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +14 lines, -0 lines 0 comments Download
A components/viz/base/base_export.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +29 lines, -0 lines 0 comments Download
A components/viz/base/switches.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +20 lines, -0 lines 0 comments Download
A components/viz/base/switches.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +16 lines, -0 lines 0 comments Download
M components/viz/frame_sinks/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +2 lines, -0 lines 0 comments Download
M components/viz/frame_sinks/gpu_root_compositor_frame_sink.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +3 lines, -0 lines 0 comments Download
M components/viz/frame_sinks/gpu_root_compositor_frame_sink.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 4 chunks +17 lines, -1 line 0 comments Download
M components/viz/frame_sinks/mojo_frame_sink_manager.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
A components/viz/hit_test/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +44 lines, -0 lines 0 comments Download
A components/viz/hit_test/DEPS View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -0 lines 0 comments Download
A components/viz/hit_test/OWNERS View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -0 lines 0 comments Download
A components/viz/hit_test/display_hit_test_data.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +55 lines, -0 lines 0 comments Download
A components/viz/hit_test/display_hit_test_data_factory.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +33 lines, -0 lines 0 comments Download
A components/viz/hit_test/display_hit_test_data_factory_local.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +34 lines, -0 lines 0 comments Download
A components/viz/hit_test/display_hit_test_data_factory_local.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +20 lines, -0 lines 0 comments Download
A components/viz/hit_test/hit_test_aggregator.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +112 lines, -0 lines 0 comments Download
A components/viz/hit_test/hit_test_aggregator.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +185 lines, -0 lines 0 comments Download
A components/viz/hit_test/hit_test_aggregator_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +851 lines, -0 lines 0 comments Download
A components/viz/hit_test/hit_test_export.h View 1 2 3 4 5 6 7 8 9 1 chunk +32 lines, -0 lines 0 comments Download
A components/viz/hit_test/public/interfaces/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +17 lines, -0 lines 0 comments Download
A components/viz/hit_test/public/interfaces/OWNERS View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download
A components/viz/hit_test/public/interfaces/hit_test_data.mojom View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +48 lines, -0 lines 4 comments Download

Messages

Total messages: 63 (42 generated)
rjkroege
you should begin with the HittestData mojo and struct traits. https://codereview.chromium.org/2908783002/diff/60001/components/viz/frame_sinks/BUILD.gn File components/viz/frame_sinks/BUILD.gn (right): https://codereview.chromium.org/2908783002/diff/60001/components/viz/frame_sinks/BUILD.gn#newcode31 ...
3 years, 7 months ago (2017-05-26 18:55:09 UTC) #21
gklassen
On 2017/05/26 18:55:09, rjkroege wrote: > you should begin with the HittestData mojo and struct ...
3 years, 7 months ago (2017-05-26 20:00:22 UTC) #26
rjkroege
https://codereview.chromium.org/2908783002/diff/100001/components/viz/frame_sinks/BUILD.gn File components/viz/frame_sinks/BUILD.gn (right): https://codereview.chromium.org/2908783002/diff/100001/components/viz/frame_sinks/BUILD.gn#newcode29 components/viz/frame_sinks/BUILD.gn:29: "//components/viz/hittest", not necessary yet? https://codereview.chromium.org/2908783002/diff/100001/components/viz/hittest/BUILD.gn File components/viz/hittest/BUILD.gn (right): https://codereview.chromium.org/2908783002/diff/100001/components/viz/hittest/BUILD.gn#newcode13 ...
3 years, 6 months ago (2017-05-29 15:58:03 UTC) #35
rjkroege
Awesome! Please continue. https://codereview.chromium.org/2908783002/diff/180001/cc/surfaces/surface_observer.h File cc/surfaces/surface_observer.h (right): https://codereview.chromium.org/2908783002/diff/180001/cc/surfaces/surface_observer.h#newcode42 cc/surfaces/surface_observer.h:42: // Runs when the Surface Aggregator ...
3 years, 6 months ago (2017-06-02 22:45:46 UTC) #45
rjkroege
Awesome! Please continue.
3 years, 6 months ago (2017-06-02 22:45:48 UTC) #46
gklassen
Many comments integrated into next patch. Some questions below. I have uploaded another patch - ...
3 years, 6 months ago (2017-06-05 21:32:14 UTC) #47
rjkroege
https://codereview.chromium.org/2908783002/diff/200001/cc/surfaces/surface_aggregator.cc File cc/surfaces/surface_aggregator.cc (right): https://codereview.chromium.org/2908783002/diff/200001/cc/surfaces/surface_aggregator.cc#newcode763 cc/surfaces/surface_aggregator.cc:763: if (!damage_rect.IsEmpty()) { Would we ever want to adjust ...
3 years, 6 months ago (2017-06-07 17:16:46 UTC) #48
gklassen
Thanks again. Most comments integrated or made irrelevant by next patch. Some questions and comments ...
3 years, 6 months ago (2017-06-07 20:04:45 UTC) #49
rjkroege
https://codereview.chromium.org/2908783002/diff/200001/cc/surfaces/surface_aggregator.cc File cc/surfaces/surface_aggregator.cc (right): https://codereview.chromium.org/2908783002/diff/200001/cc/surfaces/surface_aggregator.cc#newcode763 cc/surfaces/surface_aggregator.cc:763: if (!damage_rect.IsEmpty()) { On 2017/06/07 20:04:43, gklassen wrote: > ...
3 years, 6 months ago (2017-06-07 20:22:57 UTC) #50
rjkroege
this is looking very reasonable. https://codereview.chromium.org/2908783002/diff/320001/cc/surfaces/surface_observer.h File cc/surfaces/surface_observer.h (right): https://codereview.chromium.org/2908783002/diff/320001/cc/surfaces/surface_observer.h#newcode41 cc/surfaces/surface_observer.h:41: has added https://codereview.chromium.org/2908783002/diff/320001/components/viz/hit_test/display_hit_test_data.h File ...
3 years, 6 months ago (2017-06-07 21:19:07 UTC) #51
gklassen
I've integrated many improvements from these replies. Thank you. I will review the next reviewer ...
3 years, 6 months ago (2017-06-08 17:09:22 UTC) #52
gklassen
new patch coming... https://codereview.chromium.org/2908783002/diff/320001/cc/surfaces/surface_observer.h File cc/surfaces/surface_observer.h (right): https://codereview.chromium.org/2908783002/diff/320001/cc/surfaces/surface_observer.h#newcode41 cc/surfaces/surface_observer.h:41: On 2017/06/07 21:19:04, rjkroege wrote: > ...
3 years, 6 months ago (2017-06-08 20:33:22 UTC) #53
gklassen
new patch coming...
3 years, 6 months ago (2017-06-08 20:33:23 UTC) #54
rjkroege
https://codereview.chromium.org/2908783002/diff/320001/components/viz/hit_test/hit_test_aggregator.cc File components/viz/hit_test/hit_test_aggregator.cc (right): https://codereview.chromium.org/2908783002/diff/320001/components/viz/hit_test/hit_test_aggregator.cc#newcode45 components/viz/hit_test/hit_test_aggregator.cc:45: display_hit_test_data_->regions_[size << 2].child_count_ = kEndOfList; On 2017/06/08 20:33:21, gklassen ...
3 years, 6 months ago (2017-06-09 15:47:08 UTC) #55
gklassen
many improvements implemented with the following major exceptions: A. I haven't abstracted memory allocation yet, ...
3 years, 6 months ago (2017-06-12 16:30:42 UTC) #56
rjkroege
note the renaming necessary per email to team. https://codereview.chromium.org/2908783002/diff/420001/cc/surfaces/surface_manager.h File cc/surfaces/surface_manager.h (right): https://codereview.chromium.org/2908783002/diff/420001/cc/surfaces/surface_manager.h#newcode78 cc/surfaces/surface_manager.h:78: // ...
3 years, 6 months ago (2017-06-12 17:45:22 UTC) #57
rjkroege
let's chop this up into its components, land that and iterate around the transport. I ...
3 years, 6 months ago (2017-06-12 18:13:01 UTC) #58
gklassen
Another patch uploaded with improvements based on comments. Thank you again. The latest patch has ...
3 years, 6 months ago (2017-06-13 18:54:24 UTC) #59
gklassen
Another patch uploaded with improvements based on comments. Thank you again. The latest patch has ...
3 years, 6 months ago (2017-06-13 18:54:26 UTC) #60
sadrul
https://codereview.chromium.org/2908783002/diff/480001/components/viz/hit_test/public/interfaces/hit_test_data.mojom File components/viz/hit_test/public/interfaces/hit_test_data.mojom (right): https://codereview.chromium.org/2908783002/diff/480001/components/viz/hit_test/public/interfaces/hit_test_data.mojom#newcode24 components/viz/hit_test/public/interfaces/hit_test_data.mojom:24: const uint32 kHitTestNoTouchEventHandler = 0x10; Instead of saying 'no ...
3 years, 6 months ago (2017-06-16 17:07:56 UTC) #62
gklassen
3 years, 5 months ago (2017-06-27 19:29:02 UTC) #63
New patch uploaded with flattened directory structure & improvements based on
reviewer comments.

https://codereview.chromium.org/2908783002/diff/480001/components/viz/hit_tes...
File components/viz/hit_test/public/interfaces/hit_test_data.mojom (right):

https://codereview.chromium.org/2908783002/diff/480001/components/viz/hit_tes...
components/viz/hit_test/public/interfaces/hit_test_data.mojom:24: const uint32
kHitTestNoTouchEventHandler = 0x10;
On 2017/06/16 17:07:56, sadrul wrote:
> Instead of saying 'no touch handler', I would rather go with a 'touch handler'
> enum (i.e. the default is the client does not receive touch events, and would
> need to explicitly turn the flag on to receive touch events).

Done.

https://codereview.chromium.org/2908783002/diff/480001/components/viz/hit_tes...
components/viz/hit_test/public/interfaces/hit_test_data.mojom:37: // The
transform applied to the child region.
On 2017/06/16 17:07:56, sadrul wrote:
> Do you mean the transform of the region with respect to the embedder? Because
> it's not clear what 'child region' is referring to.

Done.

Powered by Google App Engine
This is Rietveld 408576698