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

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

Issue 2908783002: WIP Hittest Component.
Patch Set: fix z-order in use case tests ( background rects at the back ) Created 3 years, 6 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_HIT_TEST_HIT_TEST_DATA_H_
6 #define COMPONENTS_VIZ_HIT_TEST_HIT_TEST_DATA_H_
7
8 #include <stdint.h>
9
10 #include <map>
11 #include <memory>
12
13 #include "cc/surfaces/surface_id.h"
14 #include "cc/surfaces/surface_observer.h"
15 #include "components/viz/hit_test/hit_test_export.h"
16 #include "components/viz/hit_test/public/interfaces/hit_test_data.mojom.h"
17 #include "hit_test_aggregator.h"
18 #include "ui/gfx/geometry/quad_f.h"
19
20 namespace viz {
21
22 // DiplayHitTestData contains the hit_test data for the Display.
23 //
24 // It is designed to be in shared memory so that the viz process can
25 // write the hit_test data, and other processes can read without
rjkroege 2017/06/09 15:47:08 nit: only one process. The browser / ws.
gklassen 2017/06/12 16:30:41 A very welcome nit. Thank you. Done.
26 // process hops.
27 //
28 // One instance of this class contains a double buffer of entries -
rjkroege 2017/06/09 15:47:08 there is a need to add a TODO about setting up the
gklassen 2017/06/12 16:30:41 Added by abstracting allocation on your suggestion
29 // the viz process will write into one half while client processes read from
30 // the other. read_offset_ is used to swap buffers atomically.
31
32 // the child_count_ of the last region in the list is set to
33 constexpr int kEndOfList = -1;
34
35 struct DisplayHitTestRegion {
36 cc::FrameSinkId frame_sink_id_;
37 hit_test::mojom::HitTestRegionFlags flags_;
38 gfx::Rect rect_;
39 gfx::Transform transform_;
40 int child_count_;
41 };
42
43 struct DisplayHitTestData {
44 int size_;
45 base::subtle::Atomic32 read_offset_;
rjkroege 2017/06/09 15:47:07 this is communication from a less-trusted process
gklassen 2017/06/12 16:30:41 Acknowledged.
46 DisplayHitTestRegion regions_[];
47 };
48
49 } // namespace viz
50
51 #endif // COMPONENTS_VIZ_HIT_TEST_HIT_TEST_DATA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698