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

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

Issue 2938953002: Implement HitTestAggregator (Closed)
Patch Set: Keep a reference to mapped buffers & add a unit test for missing child 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_DISPLAY_HIT_TEST_DATA_H_
6 #define COMPONENTS_VIZ_COMMON_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 {
sadrul 2017/06/28 05:27:40 Don't mean to bikeshed, but ... :) The file name
gklassen 2017/06/28 16:29:59 Done.
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/public/interfaces/hit_test_data.mojom.h.
37 uint32_t flags;
38
39 // The rectangle that defines the region in parent region's coordinate space.
40 gfx::Rect rect;
41
42 // The transform applied to the rect in parent region's coordinate space.
43 gfx::Transform transform;
44
45 // The number of children including their children below this entry.
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_DISPLAY_HIT_TEST_DATA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698