OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
rjkroege
2017/06/27 00:00:07
recent discussion suggests that common should be f
gklassen
2017/06/27 21:46:32
Done.
| |
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 "services/viz/hit_test/public/interfaces/hit_test_data.mojom.h" | |
12 | |
13 namespace viz { | |
14 | |
15 // DiplayHitTestData contains the aggregated hit-test data for the Display. | |
16 // | |
17 // It is designed to be in shared memory so that the viz process can | |
18 // write the hit_test data, and the browser / ws process can read without | |
19 // process hops. | |
20 // | |
21 // One instance of this class contains a double buffer of entries - | |
22 // the viz process will write into one half while client processes read from | |
23 // the other. read_offset is used to swap buffers atomically. | |
24 | |
25 // A DisplayHitTestRegion element with child_count of kEndOfList indicates | |
26 // the last element ( end of the list ). | |
27 constexpr int kEndOfList = -1; | |
28 | |
29 struct DisplayHitTestRegion { | |
30 // The frame_sink_id corresponding to this region. Events that match | |
31 // are routed to this surface. | |
32 cc::FrameSinkId frame_sink_id; | |
33 | |
34 // Flags to indicate the type of region as defined in | |
35 // services/viz/hit_test/public/interfaces/hit_test_data.mojom.h. | |
36 uint32_t flags; | |
37 | |
38 // The rectangle that defines the region. | |
39 gfx::Rect rect; | |
40 | |
41 // The transform applied to the rect. | |
42 gfx::Transform transform; | |
43 | |
44 // The number of children ( including their children ) below this entry. | |
rjkroege
2017/06/27 00:00:07
nit: I think it's weird to have a space after/befo
gklassen
2017/06/27 21:46:32
Done.
| |
45 // If this element is not matched then child_count elements can be skipped | |
46 // to move to the next entry. | |
47 int child_count; | |
48 }; | |
49 | |
50 struct DisplayHitTestData { | |
51 int size; | |
52 DisplayHitTestRegion regions[]; | |
53 }; | |
54 | |
55 } // namespace viz | |
56 | |
57 #endif // COMPONENTS_VIZ_COMMON_HIT_TEST_DISPLAY_HIT_TEST_DATA_H_ | |
OLD | NEW |