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

Unified Diff: mojo/services/gfx/composition/interfaces/hit_tests.mojom

Issue 1552963002: Initial checkin of the new Mozart compositor. (Closed) Base URL: git@github.com:domokit/mojo.git@moz-11
Patch Set: fix android build Created 4 years, 11 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
Index: mojo/services/gfx/composition/interfaces/hit_tests.mojom
diff --git a/mojo/services/gfx/composition/interfaces/hit_tests.mojom b/mojo/services/gfx/composition/interfaces/hit_tests.mojom
new file mode 100644
index 0000000000000000000000000000000000000000..d18d868d63c481f534c3aced72d4b30bbea680a8
--- /dev/null
+++ b/mojo/services/gfx/composition/interfaces/hit_tests.mojom
@@ -0,0 +1,49 @@
+// Copyright 2015 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.
+
+[DartPackage="mojo_services"]
+module mojo.gfx.composition;
+
+import "mojo/services/geometry/interfaces/geometry.mojom";
+import "mojo/services/gfx/composition/interfaces/scene_token.mojom";
+
+// Indicates that hit testing is not needed for a given node.
+const uint32 kHitIdNone = 0;
+
+// Provides information about the point of intersection of a hit test with
+// a node in a scene graph.
+struct Hit {
+ // The scene token of the scene which was hit.
+ SceneToken scene_token;
+
+ // The version of the scene which was consulted as part of evaluating the
+ // hit test.
+ uint32 scene_version;
+
+ // The node id of the node which was hit.
+ uint32 node_id;
+
+ // The hit test id of the node which was hit.
+ uint32 hit_id;
+
+ // The coordinates of the hit within the node's content space.
+ mojo.Point intersection;
+};
+
+// The result of a hit test operation.
+struct HitTestResult {
+ // A sorted list of hits in dispatch order from the top-most hit node
+ // to the nodes underneath it and containing it, or an empty array if none.
+ // Omits nodes for which the hit_id was |kHitIdNone|.
+ array<Hit> hits;
+};
+
+// A hit testing service for scene graphs.
+interface HitTester {
+ // Performs a hit test on the specified point.
+ //
+ // TODO(jeffbrown): Specify a timestamp to allow for hit-tests of geometry
+ // as it appeared in the recent past.
+ HitTest(mojo.Point point) => (HitTestResult result);
+};
« no previous file with comments | « mojo/services/gfx/composition/interfaces/compositor.mojom ('k') | mojo/services/gfx/composition/interfaces/nodes.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698