OLD | NEW |
---|---|
(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 #ifndef COMPONENTS_VIZ_COMMON_HIT_TEST_DISPLAY_HIT_TEST_DATA_H_ | |
6 #define COMPONENTS_VIZ_COMMON_HIT_TEST_DISPLAY_HIT_TEST_DATA_H_ | |
7 | |
8 #include <stdint.h> | |
9 | |
10 #include "cc/surfaces/surface_id.h" | |
11 #include "ui/gfx/geometry/rect.h" | |
12 #include "ui/gfx/transform.h" | |
13 | |
14 namespace viz { | |
15 | |
16 // DiplayHitTestData contains the aggregated hit-test data for the Display. | |
17 // | |
18 // It is designed to be in shared memory so that the viz process can | |
19 // write the hit_test data, and the browser / ws process can read without | |
20 // process hops. | |
21 // | |
22 // One instance of this class contains a double buffer of entries - | |
23 // the viz process will write into one half while client processes read from | |
24 // the other. read_offset is used to swap buffers atomically. | |
25 | |
26 // A DisplayHitTestRegion element with child_count of kEndOfList indicates | |
27 // the last element ( end of the list ). | |
28 constexpr int kEndOfList = -1; | |
29 | |
30 struct DisplayHitTestRegion { | |
31 // The cc::FrameSinkId corresponding to this region. Events that match | |
32 // are routed to this surface. | |
33 cc::FrameSinkId frame_sink_id; | |
34 | |
35 // Flags to indicate the type of region as defined in | |
36 // services/viz/hit_test/public/interfaces/hit_test_data.mojom.h. | |
37 uint32_t flags; | |
38 | |
39 // The rectangle that defines the region. | |
sadrul
2017/06/27 04:23:34
In the parent region's coordinate space, I guess?
gklassen
2017/06/27 21:46:33
Done.
| |
40 gfx::Rect rect; | |
41 | |
42 // The transform applied to the rect. | |
sadrul
2017/06/27 04:23:34
ditto
gklassen
2017/06/27 21:46:33
Done.
| |
43 gfx::Transform transform; | |
44 | |
45 // The number of children ( including their children ) below this entry. | |
sadrul
2017/06/27 04:23:34
no space after ( or before ) (applies to other pla
gklassen
2017/06/27 21:46:33
Done.
| |
46 // If this element is not matched then child_count elements can be skipped | |
47 // to move to the next entry. | |
48 int child_count; | |
49 }; | |
50 | |
51 } // namespace viz | |
52 | |
53 #endif // COMPONENTS_VIZ_COMMON_HIT_TEST_DISPLAY_HIT_TEST_DATA_H_ | |
OLD | NEW |