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

Issue 2938953002: Implement HitTestAggregator (Closed)

Created:
3 years, 6 months ago by gklassen
Modified:
3 years, 5 months ago
CC:
chromium-reviews, qsr+mojo_chromium.org, droger+watchlist_chromium.org, viettrungluu+watch_chromium.org, blundell+watchlist_chromium.org, sdefresne+watchlist_chromium.org, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, cc-bugs_chromium.org, darin (slow to review)
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Implement HitTestAggregator Implements a HitTestAggregator component to facilitate cross process hit testing with minimal process hops. The HitTestAggregator maintains a list of HitTestData objects that will be created and sent with each CompositorFrame. These are aggregated into a single DisplayHitTest data structure that can be made available in shared memory to facilitate hit testing with minimal process hops for any Display. HitTestAggregator listens as surfaces are added to the current CompositorFrame to ensure that the list only includes information that matches what has been rendered in the current frame. Aggregation occurs on the BeginFrame notification. This change includes the implementaiton of the HitTestAggregator and unit test cases to verify the intended behaviour. Next steps will include completion of the creation and transport of HitTestData objects, implementation of shared memory and using this component to target incoming events. BUG=732399 Review-Url: https://codereview.chromium.org/2938953002 Cr-Commit-Position: refs/heads/master@{#486852} Committed: https://chromium.googlesource.com/chromium/src/+/57cb4a50cf2c5e3a2c7015a4d335aa894c982338

Patch Set 1 #

Patch Set 2 : rebase #

Total comments: 40

Patch Set 3 : reorganize files to conform to agreed structure #

Patch Set 4 : improvents based on reviewer comments ( partial ) #

Total comments: 60

Patch Set 5 : Re-implement bounds to clean up tree nicely #

Patch Set 6 : improvements based on reviewer comments #

Total comments: 40

Patch Set 7 : Use two distinct buffers instead of one and remove in-place synchronization. #

Total comments: 21

Patch Set 8 : Use Shared Memory handles and mappings to manage buffers & other improvements based on reviewer com… #

Total comments: 31

Patch Set 9 : flatten directory structure & other improvements based on reviewer comments #

Patch Set 10 : Keep a reference to mapped buffers & add a unit test for missing child #

Total comments: 8

Patch Set 11 : Rename HitTestData to HitTestRegionList and improve array check #

Total comments: 2

Patch Set 12 : Remove non-committers from OWNERS and sharpend includes in DEPS #

Total comments: 14

Patch Set 13 : address nits #

Patch Set 14 : remove spaces after brackets in coments #

Total comments: 14

Patch Set 15 : rebase & improvements based on comments #

Total comments: 2

Patch Set 16 : correct active count logic and add unit test to protect against similar errors #

Total comments: 17

Patch Set 17 : sharpen dependencies and improve comments based on review #

Patch Set 18 : rename DisplayHitTestRegion to AggregatedHitTestRegion #

Total comments: 1

Patch Set 19 : rebase #

Patch Set 20 : remove DEPS made unnecessary by rebase #

Patch Set 21 : make destructor default #

Patch Set 22 : add transform include to resolve build bot failure #

Total comments: 51

Patch Set 23 : improvements based on reviewer comments #

Patch Set 24 : move common hit_test code into hit_test folder #

Total comments: 8

Patch Set 25 : rebase and improvements based on reviewer comments #

Patch Set 26 : remove unnecessary include added at rebase #

Total comments: 4

Patch Set 27 : correct mojom include directory #

Patch Set 28 : correct mojom include directory and improvements based on reviewer comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1486 lines, -0 lines) Patch
M components/viz/common/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 2 chunks +2 lines, -0 lines 0 comments Download
A components/viz/common/hit_test/DEPS View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +4 lines, -0 lines 0 comments Download
A components/viz/common/hit_test/aggregated_hit_test_region.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +49 lines, -0 lines 0 comments Download
M components/viz/service/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 4 chunks +10 lines, -0 lines 0 comments Download
A components/viz/service/hit_test/DEPS View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 1 chunk +5 lines, -0 lines 0 comments Download
A components/viz/service/hit_test/OWNERS View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
A components/viz/service/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 21 22 23 24 25 26 1 chunk +107 lines, -0 lines 0 comments Download
A components/viz/service/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 22 23 24 1 chunk +212 lines, -0 lines 0 comments Download
A components/viz/service/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 22 23 24 25 26 27 1 chunk +1017 lines, -0 lines 0 comments Download
A services/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 19 20 21 22 1 chunk +17 lines, -0 lines 0 comments Download
A services/viz/hit_test/public/interfaces/OWNERS View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +3 lines, -0 lines 0 comments Download
A services/viz/hit_test/public/interfaces/hit_test_region_list.mojom View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +59 lines, -0 lines 0 comments Download

Messages

Total messages: 88 (36 generated)
gklassen
( is sending this email required to kick start the review? )
3 years, 6 months ago (2017-06-15 12:48:10 UTC) #4
rjkroege
Excellent progress -- some more stuff to sort out per discussion: transformations, ordering and compatibility ...
3 years, 6 months ago (2017-06-15 21:58:45 UTC) #5
gklassen
New patch coming soon ( after I convert squares to rects in test cases ). ...
3 years, 6 months ago (2017-06-16 21:49:39 UTC) #6
varkha
Just learning about this and driving by so posting a few nits. https://codereview.chromium.org/2938953002/diff/60001/components/viz/common/hit_test/OWNERS File components/viz/common/hit_test/OWNERS ...
3 years, 6 months ago (2017-06-19 21:15:05 UTC) #8
gklassen
New patch uploaded that includes - refactoring of the tree to add bounds ( it ...
3 years, 6 months ago (2017-06-20 16:09:39 UTC) #9
varkha
Thanks, no need to address the nits before taking on deeper work but I was ...
3 years, 6 months ago (2017-06-20 19:56:59 UTC) #10
riajiang
https://codereview.chromium.org/2938953002/diff/100001/components/viz/common/DEPS File components/viz/common/DEPS (right): https://codereview.chromium.org/2938953002/diff/100001/components/viz/common/DEPS#newcode3 components/viz/common/DEPS:3: "+cc/surfaces", "+cc/..." before "+services/..."? Also Rob commented about this ...
3 years, 6 months ago (2017-06-20 23:54:59 UTC) #12
gklassen
The latest patch contains improvements based on reviewer comments and discussion inlcluding - re-arrangements of ...
3 years, 5 months ago (2017-06-26 21:55:20 UTC) #13
rjkroege
assorted comments. major issue here is the revised naming or stuff... sorry. https://codereview.chromium.org/2938953002/diff/120001/components/viz/common/BUILD.gn File components/viz/common/BUILD.gn ...
3 years, 5 months ago (2017-06-27 00:00:07 UTC) #14
sadrul
https://codereview.chromium.org/2938953002/diff/140001/components/viz/common/hit_test/display_hit_test_data.h File components/viz/common/hit_test/display_hit_test_data.h (right): https://codereview.chromium.org/2938953002/diff/140001/components/viz/common/hit_test/display_hit_test_data.h#newcode39 components/viz/common/hit_test/display_hit_test_data.h:39: // The rectangle that defines the region. In the ...
3 years, 5 months ago (2017-06-27 04:23:35 UTC) #16
gklassen
Patch uploaded with flattened hierarchy and addressing most nits. https://codereview.chromium.org/2938953002/diff/120001/components/viz/common/hit_test/display_hit_test_data.h File components/viz/common/hit_test/display_hit_test_data.h (right): https://codereview.chromium.org/2938953002/diff/120001/components/viz/common/hit_test/display_hit_test_data.h#newcode1 components/viz/common/hit_test/display_hit_test_data.h:1: ...
3 years, 5 months ago (2017-06-27 21:46:33 UTC) #17
gklassen
One more modification to keep a reference to mapped buffers as Sadrul suggested and added ...
3 years, 5 months ago (2017-06-27 21:52:38 UTC) #18
sadrul
> I'd value input on whether this is close to something we could land and ...
3 years, 5 months ago (2017-06-28 05:27:40 UTC) #19
gklassen
New patch uploaded that addresses Sadrul's comments. https://codereview.chromium.org/2938953002/diff/140001/services/viz/hit_test/public/interfaces/hit_test_data.mojom File services/viz/hit_test/public/interfaces/hit_test_data.mojom (right): https://codereview.chromium.org/2938953002/diff/140001/services/viz/hit_test/public/interfaces/hit_test_data.mojom#newcode59 services/viz/hit_test/public/interfaces/hit_test_data.mojom:59: array<HitTestRegion> regions; ...
3 years, 5 months ago (2017-06-28 16:29:59 UTC) #20
rjkroege
lgtm. https://codereview.chromium.org/2938953002/diff/200001/components/viz/common/DEPS File components/viz/common/DEPS (right): https://codereview.chromium.org/2938953002/diff/200001/components/viz/common/DEPS#newcode2 components/viz/common/DEPS:2: "+cc/surfaces", this is overly-broad. It would be nicer ...
3 years, 5 months ago (2017-06-28 18:19:25 UTC) #21
varkha
https://codereview.chromium.org/2938953002/diff/220001/components/viz/service/hit_test/hit_test_aggregator.cc File components/viz/service/hit_test/hit_test_aggregator.cc (right): https://codereview.chromium.org/2938953002/diff/220001/components/viz/service/hit_test/hit_test_aggregator.cc#newcode27 components/viz/service/hit_test/hit_test_aggregator.cc:27: } nit: ws https://codereview.chromium.org/2938953002/diff/220001/components/viz/service/hit_test/hit_test_aggregator.cc#newcode44 components/viz/service/hit_test/hit_test_aggregator.cc:44: } ditto https://codereview.chromium.org/2938953002/diff/220001/components/viz/service/hit_test/hit_test_aggregator.cc#newcode114 components/viz/service/hit_test/hit_test_aggregator.cc:114: ...
3 years, 5 months ago (2017-06-28 19:20:38 UTC) #22
riajiang
https://codereview.chromium.org/2938953002/diff/220001/components/viz/common/BUILD.gn File components/viz/common/BUILD.gn (right): https://codereview.chromium.org/2938953002/diff/220001/components/viz/common/BUILD.gn#newcode7 components/viz/common/BUILD.gn:7: "hit_test/display_hit_test_region.h", No hit_test/? Also there's no BUILD.gn and DEPS ...
3 years, 5 months ago (2017-06-28 19:23:51 UTC) #23
varkha
lgtm with a couple small nits but you probably need to address riajiang@'s build concerns. ...
3 years, 5 months ago (2017-06-28 19:47:05 UTC) #24
sadrul
lgtm (you will get some merge conflicts when you merge with tot before landing) https://codereview.chromium.org/2938953002/diff/260001/components/viz/service/hit_test/hit_test_aggregator.cc ...
3 years, 5 months ago (2017-06-28 20:30:12 UTC) #25
varkha
https://codereview.chromium.org/2938953002/diff/260001/components/viz/service/hit_test/hit_test_aggregator.h File components/viz/service/hit_test/hit_test_aggregator.h (right): https://codereview.chromium.org/2938953002/diff/260001/components/viz/service/hit_test/hit_test_aggregator.h#newcode102 components/viz/service/hit_test/hit_test_aggregator.h:102: int write_size_; On 2017/06/28 20:30:12, sadrul wrote: > Please ...
3 years, 5 months ago (2017-06-28 21:22:00 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2938953002/280001
3 years, 5 months ago (2017-06-28 23:35:12 UTC) #29
sadrul
https://codereview.chromium.org/2938953002/diff/280001/components/viz/service/hit_test/hit_test_aggregator.cc File components/viz/service/hit_test/hit_test_aggregator.cc (right): https://codereview.chromium.org/2938953002/diff/280001/components/viz/service/hit_test/hit_test_aggregator.cc#newcode68 components/viz/service/hit_test/hit_test_aggregator.cc:68: auto active_search = active_.find(surface_id); This will not work since ...
3 years, 5 months ago (2017-06-28 23:36:37 UTC) #30
gklassen
Thanks for the catch Sadrul. https://codereview.chromium.org/2938953002/diff/220001/components/viz/common/BUILD.gn File components/viz/common/BUILD.gn (right): https://codereview.chromium.org/2938953002/diff/220001/components/viz/common/BUILD.gn#newcode7 components/viz/common/BUILD.gn:7: "hit_test/display_hit_test_region.h", On 2017/06/28 19:23:50, ...
3 years, 5 months ago (2017-06-29 11:56:27 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2938953002/300001
3 years, 5 months ago (2017-06-29 11:58:35 UTC) #35
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/477387)
3 years, 5 months ago (2017-06-29 12:06:28 UTC) #37
riajiang
lgtm
3 years, 5 months ago (2017-06-29 12:56:49 UTC) #38
riajiang
I think you also need LGTM from an owner for changes in DEPS (presubmit suggested ...
3 years, 5 months ago (2017-06-29 13:59:36 UTC) #39
gklassen
+ tsepez for security review of mojom and jbauman for review of includes dependencies on ...
3 years, 5 months ago (2017-06-29 15:33:52 UTC) #41
gklassen
+ danakj for DEPS review.
3 years, 5 months ago (2017-06-29 19:45:17 UTC) #43
Tom Sepez
lgtm
3 years, 5 months ago (2017-06-29 19:47:55 UTC) #44
rjkroege
https://codereview.chromium.org/2938953002/diff/300001/components/viz/common/DEPS File components/viz/common/DEPS (right): https://codereview.chromium.org/2938953002/diff/300001/components/viz/common/DEPS#newcode2 components/viz/common/DEPS:2: "+cc/surfaces", I think this is too broad. Can you ...
3 years, 5 months ago (2017-06-30 20:10:36 UTC) #45
danakj
https://codereview.chromium.org/2938953002/diff/300001/components/viz/common/DEPS File components/viz/common/DEPS (right): https://codereview.chromium.org/2938953002/diff/300001/components/viz/common/DEPS#newcode2 components/viz/common/DEPS:2: "+cc/surfaces", On 2017/06/30 20:10:36, rjkroege wrote: > I think ...
3 years, 5 months ago (2017-06-30 20:39:38 UTC) #46
gklassen
Thank you Dana! Sharpening the viz/common DEPS worked well and resolved the viz/common->services/viz/public/interfaces dependency. The ...
3 years, 5 months ago (2017-07-12 14:43:52 UTC) #47
Fady Samuel
https://codereview.chromium.org/2938953002/diff/300001/components/viz/service/hit_test/hit_test_aggregator.cc File components/viz/service/hit_test/hit_test_aggregator.cc (right): https://codereview.chromium.org/2938953002/diff/300001/components/viz/service/hit_test/hit_test_aggregator.cc#newcode47 components/viz/service/hit_test/hit_test_aggregator.cc:47: HitTestAggregator::~HitTestAggregator() {} nit: = default https://codereview.chromium.org/2938953002/diff/340001/components/viz/service/hit_test/hit_test_aggregator.cc File components/viz/service/hit_test/hit_test_aggregator.cc (right): ...
3 years, 5 months ago (2017-07-12 14:46:38 UTC) #49
sadrul
On 2017/07/12 14:43:52, gklassen wrote: > Thank you Dana! > > Sharpening the viz/common DEPS ...
3 years, 5 months ago (2017-07-12 14:59:04 UTC) #54
gklassen
latest patch includes rebase and related changes. Dana and Fady can you please review dependencies?
3 years, 5 months ago (2017-07-12 17:06:04 UTC) #55
gklassen
( latest patch also addresses making HitTestAggregator destructor default ) https://codereview.chromium.org/2938953002/diff/300001/components/viz/service/hit_test/hit_test_aggregator.cc File components/viz/service/hit_test/hit_test_aggregator.cc (right): https://codereview.chromium.org/2938953002/diff/300001/components/viz/service/hit_test/hit_test_aggregator.cc#newcode47 ...
3 years, 5 months ago (2017-07-12 17:11:54 UTC) #58
Fady Samuel
lgtm
3 years, 5 months ago (2017-07-12 20:50:10 UTC) #61
Fady Samuel
https://codereview.chromium.org/2938953002/diff/420001/services/viz/public/interfaces/hit_test_region_list.mojom File services/viz/public/interfaces/hit_test_region_list.mojom (right): https://codereview.chromium.org/2938953002/diff/420001/services/viz/public/interfaces/hit_test_region_list.mojom#newcode5 services/viz/public/interfaces/hit_test_region_list.mojom:5: module viz.hit_test.mojom; nit: per offline discussion with danakj, viz.mojom.
3 years, 5 months ago (2017-07-13 15:15:31 UTC) #64
danakj
I looked at the C++ more this time and have a number of comments https://codereview.chromium.org/2938953002/diff/420001/components/viz/common/BUILD.gn ...
3 years, 5 months ago (2017-07-13 15:39:40 UTC) #65
gklassen
new patch uploaded that should address all comments except the suggestion to eliminate the use ...
3 years, 5 months ago (2017-07-13 19:59:15 UTC) #66
danakj
https://codereview.chromium.org/2938953002/diff/420001/components/viz/service/hit_test/hit_test_aggregator_unittest.cc File components/viz/service/hit_test/hit_test_aggregator_unittest.cc (right): https://codereview.chromium.org/2938953002/diff/420001/components/viz/service/hit_test/hit_test_aggregator_unittest.cc#newcode194 components/viz/service/hit_test/hit_test_aggregator_unittest.cc:194: EXPECT_EQ(GetPendingCount(), 0); On 2017/07/13 19:59:14, gklassen wrote: > On ...
3 years, 5 months ago (2017-07-13 20:10:30 UTC) #67
varkha
https://codereview.chromium.org/2938953002/diff/420001/components/viz/service/hit_test/hit_test_aggregator_unittest.cc File components/viz/service/hit_test/hit_test_aggregator_unittest.cc (right): https://codereview.chromium.org/2938953002/diff/420001/components/viz/service/hit_test/hit_test_aggregator_unittest.cc#newcode194 components/viz/service/hit_test/hit_test_aggregator_unittest.cc:194: EXPECT_EQ(GetPendingCount(), 0); On 2017/07/13 20:10:30, danakj wrote: > On ...
3 years, 5 months ago (2017-07-13 20:29:29 UTC) #68
danakj
On Thu, Jul 13, 2017 at 4:29 PM, <varkha@chromium.org> wrote: > > https://codereview.chromium.org/2938953002/diff/420001/ > components/viz/service/hit_test/hit_test_aggregator_unittest.cc ...
3 years, 5 months ago (2017-07-14 15:11:27 UTC) #73
danakj
LGTM https://codereview.chromium.org/2938953002/diff/420001/components/viz/service/hit_test/hit_test_aggregator.cc File components/viz/service/hit_test/hit_test_aggregator.cc (right): https://codereview.chromium.org/2938953002/diff/420001/components/viz/service/hit_test/hit_test_aggregator.cc#newcode142 components/viz/service/hit_test/hit_test_aggregator.cc:142: CHECK(search != active_.end()); On 2017/07/13 19:59:14, gklassen wrote: ...
3 years, 5 months ago (2017-07-14 15:27:37 UTC) #74
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2938953002/500001
3 years, 5 months ago (2017-07-14 16:52:06 UTC) #77
gklassen
Thank you again Dana, and everyone - this change is much better because of your ...
3 years, 5 months ago (2017-07-14 16:54:46 UTC) #78
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_compile_dbg_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg_ng/builds/463675) mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, ...
3 years, 5 months ago (2017-07-14 17:01:45 UTC) #80
danakj
Thanks, that looks good https://codereview.chromium.org/2938953002/diff/500001/components/viz/service/hit_test/hit_test_aggregator_unittest.cc File components/viz/service/hit_test/hit_test_aggregator_unittest.cc (right): https://codereview.chromium.org/2938953002/diff/500001/components/viz/service/hit_test/hit_test_aggregator_unittest.cc#newcode28 components/viz/service/hit_test/hit_test_aggregator_unittest.cc:28: TestHitTestAggregator() {} nit: = default ...
3 years, 5 months ago (2017-07-14 17:15:15 UTC) #81
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2938953002/540001
3 years, 5 months ago (2017-07-14 17:33:58 UTC) #84
gklassen
Thanks again. I had to correct the mojom include directory to fix the build ( ...
3 years, 5 months ago (2017-07-14 17:35:05 UTC) #85
commit-bot: I haz the power
3 years, 5 months ago (2017-07-14 19:43:00 UTC) #88
Message was sent while issue was closed.
Committed patchset #28 (id:540001) as
https://chromium.googlesource.com/chromium/src/+/57cb4a50cf2c5e3a2c7015a4d335...

Powered by Google App Engine
This is Rietveld 408576698