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

Unified Diff: components/viz/common/hit_test/aggregated_hit_test_region.h

Issue 2938953002: Implement HitTestAggregator (Closed)
Patch Set: correct mojom include directory and improvements based on reviewer comments 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/viz/common/hit_test/DEPS ('k') | components/viz/service/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/viz/common/hit_test/aggregated_hit_test_region.h
diff --git a/components/viz/common/hit_test/aggregated_hit_test_region.h b/components/viz/common/hit_test/aggregated_hit_test_region.h
new file mode 100644
index 0000000000000000000000000000000000000000..b90bfb19a6e5c46af15eccfa4f7870eb0732bbcf
--- /dev/null
+++ b/components/viz/common/hit_test/aggregated_hit_test_region.h
@@ -0,0 +1,49 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_VIZ_COMMON_HIT_TEST_AGGREGATED_HIT_TEST_REGION_H_
+#define COMPONENTS_VIZ_COMMON_HIT_TEST_AGGREGATED_HIT_TEST_REGION_H_
+
+#include <stdint.h>
+
+#include "components/viz/common/surfaces/surface_id.h"
+#include "ui/gfx/geometry/rect.h"
+#include "ui/gfx/transform.h"
+
+namespace viz {
+
+// A AggregatedHitTestRegion element with child_count of kEndOfList indicates
+// the last element and end of the list.
+constexpr int kEndOfList = -1;
+
+// An array of AggregatedHitTestRegion elements is used to define the
+// aggregated hit-test data for the Display.
+//
+// It is designed to be in shared memory so that the viz service can
+// write the hit_test data, and the viz host can read without
+// process hops.
+struct AggregatedHitTestRegion {
+ // The FrameSinkId corresponding to this region. Events that match
+ // are routed to this surface.
+ FrameSinkId frame_sink_id;
+
+ // Flags to indicate the type of region as defined for
+ // mojom::HitTestRegion
+ uint32_t flags;
+
+ // The rectangle that defines the region in parent region's coordinate space.
+ gfx::Rect rect;
+
+ // The transform applied to the rect in parent region's coordinate space.
+ gfx::Transform transform;
+
+ // The number of children including their children below this entry.
+ // If this element is not matched then child_count elements can be skipped
+ // to move to the next entry.
+ int child_count;
+};
+
+} // namespace viz
+
+#endif // COMPONENTS_VIZ_COMMON_HIT_TEST_AGGREGATED_HIT_TEST_REGION_H_
« no previous file with comments | « components/viz/common/hit_test/DEPS ('k') | components/viz/service/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698