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

Side by Side Diff: components/viz/common/aggregated_hit_test_region.h

Issue 2938953002: Implement HitTestAggregator (Closed)
Patch Set: add transform include to resolve build bot failure 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 #ifndef COMPONENTS_VIZ_COMMON_AGGREGATED_HIT_TEST_REGION_H_
6 #define COMPONENTS_VIZ_COMMON_AGGREGATED_HIT_TEST_REGION_H_
7
8 #include <stdint.h>
9
10 #include "components/viz/common/surface_id.h"
11 #include "ui/gfx/geometry/rect.h"
12 #include "ui/gfx/transform.h"
13
14 namespace viz {
15
16 // A AggregatedHitTestRegion element with child_count of kEndOfList indicates
17 // the last element and end of the list.
18 constexpr int kEndOfList = -1;
19
20 // An array of AggregatedHitTestRegion elements is used to define the
21 // aggregated hit-test data for the Display.
22 //
23 // It is designed to be in shared memory so that the viz service can
24 // write the hit_test data, and the viz host can read without
25 // process hops.
26
danakj 2017/07/13 15:39:38 nit: remove whitespace between comment and the thi
gklassen 2017/07/13 19:59:13 Done.
27 struct AggregatedHitTestRegion {
28 // The FrameSinkId corresponding to this region. Events that match
29 // are routed to this surface.
30 FrameSinkId frame_sink_id;
31
32 // Flags to indicate the type of region as defined in
33 // services/viz/public/interfaces/hit_test_region_list.mojom.h.
danakj 2017/07/13 15:39:38 i would specify the namespace+typename rather than
gklassen 2017/07/13 19:59:14 Done.
34 uint32_t flags;
35
36 // The rectangle that defines the region in parent region's coordinate space.
37 gfx::Rect rect;
38
39 // The transform applied to the rect in parent region's coordinate space.
40 gfx::Transform transform;
41
42 // The number of children including their children below this entry.
43 // If this element is not matched then child_count elements can be skipped
44 // to move to the next entry.
45 int child_count;
46 };
47
48 } // namespace viz
49
50 #endif // COMPONENTS_VIZ_COMMON_AGGREGATED_HIT_TEST_REGION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698