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

Side by Side 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 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 [DartPackage="mojo_services"]
6 module mojo.gfx.composition;
7
8 import "mojo/services/geometry/interfaces/geometry.mojom";
9 import "mojo/services/gfx/composition/interfaces/scene_token.mojom";
10
11 // Indicates that hit testing is not needed for a given node.
12 const uint32 kHitIdNone = 0;
13
14 // Provides information about the point of intersection of a hit test with
15 // a node in a scene graph.
16 struct Hit {
17 // The scene token of the scene which was hit.
18 SceneToken scene_token;
19
20 // The version of the scene which was consulted as part of evaluating the
21 // hit test.
22 uint32 scene_version;
23
24 // The node id of the node which was hit.
25 uint32 node_id;
26
27 // The hit test id of the node which was hit.
28 uint32 hit_id;
29
30 // The coordinates of the hit within the node's content space.
31 mojo.Point intersection;
32 };
33
34 // The result of a hit test operation.
35 struct HitTestResult {
36 // A sorted list of hits in dispatch order from the top-most hit node
37 // to the nodes underneath it and containing it, or an empty array if none.
38 // Omits nodes for which the hit_id was |kHitIdNone|.
39 array<Hit> hits;
40 };
41
42 // A hit testing service for scene graphs.
43 interface HitTester {
44 // Performs a hit test on the specified point.
45 //
46 // TODO(jeffbrown): Specify a timestamp to allow for hit-tests of geometry
47 // as it appeared in the recent past.
48 HitTest(mojo.Point point) => (HitTestResult result);
49 };
OLDNEW
« 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