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

Side by Side Diff: services/viz/hit_test/public/interfaces/hit_test_data.mojom

Issue 2938953002: Implement HitTestAggregator (Closed)
Patch Set: Use Shared Memory handles and mappings to manage buffers & other improvements based on reviewer com… Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 module viz.hit_test.mojom;
6
7 import "cc/ipc/surface_id.mojom";
8 import "ui/gfx/geometry/mojo/geometry.mojom";
9 import "ui/gfx/mojo/transform.mojom";
10
11 // Region maps to this surface ( me ).
12 const uint32 kHitTestMine = 0x01;
13
14 // Region ignored for hit testing ( transparent backgrounds & hover:none ).
15 const uint32 kHitTestIgnore = 0x02;
16
17 // Region maps to child surface ( OOPIF ).
18 const uint32 kHitTestChildSurface = 0x04;
19
20 // Irregular boundary - send HitTestRequest to resolve.
21 const uint32 kHitTestAsk = 0x08;
22
23 // No touch event handler exists - no need to send touch events.
24 const uint32 kHitTestNoTouchEventHandler = 0x10;
sadrul 2017/06/27 04:23:35 As mentioned in https://codereview.chromium.org/29
gklassen 2017/06/27 21:46:33 Hmmm... I reviewed this implementation in detail,
25
26 struct HitTestRegion {
27
sadrul 2017/06/27 04:23:35 no blank line.
gklassen 2017/06/27 21:46:33 Done.
28 // Flags to indicate the type of HitTestRegion.
29 uint32 flags;
30
31 // SurfaceId is required when flags = kHitTestChildSurface.
32 cc.mojom.SurfaceId surface_id;
33
34 // The rect of the region in the coordinate space of the embedder.
35 gfx.mojom.Rect rect;
36
37 // The transform applied to the child region.
sadrul 2017/06/27 04:23:35 What is 'child region'? (https://codereview.chromi
gklassen 2017/06/27 21:46:33 Done.
38 gfx.mojom.Transform transform;
39 };
40
41 struct HitTestData {
42
sadrul 2017/06/27 04:23:35 ditto
gklassen 2017/06/27 21:46:33 Done.
43 // SurfaceId corresponding to this HitTestData.
44 cc.mojom.SurfaceId surface_id;
45
46 // Flags indicate how to handle events that match no sub-regions.
47 // kHitTestMine routes un-matched events to this surface ( opaque ).
48 // kHitTestIgnore keeps previous match in the parent ( transparent ).
49 uint32 flags;
50
51 // The bounds of the surface.
52 gfx.mojom.Rect bounds;
53
54 // The transform that applies to all regions in this surface.
55 gfx.mojom.Transform transform;
56
57 // The list of sub-regions in front to back order.
58 // TODO(gklassen): invert order if it's easier to write them back to front.
59 array<HitTestRegion> regions;
sadrul 2017/06/27 04:23:35 As mentioned in Ria's CL, I think I would go with
gklassen 2017/06/27 21:46:33 Agreed that neither is clearly a list of the other
sadrul 2017/06/28 05:27:40 I think the distinction between the two that matte
gklassen 2017/06/28 16:29:59 Done.
60 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698