 Chromium Code Reviews
 Chromium Code Reviews Issue 2938953002:
  Implement HitTestAggregator  (Closed)
    
  
    Issue 2938953002:
  Implement HitTestAggregator  (Closed) 
  | 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_DISPLAY_HIT_TEST_REGION_H_ | |
| 6 #define COMPONENTS_VIZ_COMMON_DISPLAY_HIT_TEST_REGION_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 // An array of DisplayHitTestRegion elements is used to define the | |
| 
danakj
2017/06/30 20:39:38
put this comment directly above the struct definit
 
gklassen
2017/07/12 14:43:51
Done.
 | |
| 17 // aggregated hit-test data for the Display. | |
| 18 // | |
| 19 // It is designed to be in shared memory so that the viz process can | |
| 
danakj
2017/06/30 20:39:38
viz service can write
 
gklassen
2017/07/12 14:43:51
Done.
 | |
| 20 // write the hit_test data, and the browser / ws process can read without | |
| 
danakj
2017/06/30 20:39:38
the viz host can read
 
gklassen
2017/07/12 14:43:51
Done.
 | |
| 21 // process hops. | |
| 22 | |
| 23 // A DisplayHitTestRegion element with child_count of kEndOfList indicates | |
| 24 // the last element and end of the list. | |
| 25 constexpr int kEndOfList = -1; | |
| 26 | |
| 27 struct DisplayHitTestRegion { | |
| 
danakj
2017/06/30 20:39:38
I suggest AggregatedHitTestRegion, because HitTest
 
gklassen
2017/07/12 14:43:51
Done.
 | |
| 28 // The cc::FrameSinkId corresponding to this region. Events that match | |
| 29 // are routed to this surface. | |
| 30 cc::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. | |
| 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_DISPLAY_HIT_TEST_REGION_H_ | |
| OLD | NEW |