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

Unified Diff: services/shape_detection/public/interfaces/facedetection.mojom

Issue 2859413002: Shape Detection: add idl and mojom for face landmarks and wire for Mac (Closed)
Patch Set: service-worker's global-interface-listing-expected.txt updated Created 3 years, 7 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: services/shape_detection/public/interfaces/facedetection.mojom
diff --git a/services/shape_detection/public/interfaces/facedetection.mojom b/services/shape_detection/public/interfaces/facedetection.mojom
index 38102f80b0978b7a4aaadbc25249984207d80299..dda46fa969816f1872a6c4f05208c7e0930f5ff8 100644
--- a/services/shape_detection/public/interfaces/facedetection.mojom
+++ b/services/shape_detection/public/interfaces/facedetection.mojom
@@ -8,11 +8,21 @@ module shape_detection.mojom;
import "ui/gfx/geometry/mojo/geometry.mojom";
+// https://wicg.github.io/shape-detection-api/#enumdef-landmarktype
+enum LandmarkType { MOUTH, EYE };
+
+// https://wicg.github.io/shape-detection-api/#dictdef-landmark
+struct Landmark {
+ gfx.mojom.PointF location;
+ LandmarkType type;
+};
+
// Since "//ui/gfx/geometry/mojo" is not exposed to blink, we need to declare
// a wrapper struct, so that gfx.mojom.RectF will not be directly referenced
// inside Blink, and browser can still use gfx types.
struct FaceDetectionResult {
- array<gfx.mojom.RectF> bounding_boxes;
+ gfx.mojom.RectF bounding_box;
+ array<Landmark> landmarks;
};
struct FaceDetectorOptions {
@@ -25,5 +35,5 @@ interface FaceDetection {
// row-major order.
// TODO(mcasas): Consider using mojo::Bitmap here, https://crbug.com/665488.
Detect(handle<shared_buffer> frame_data, uint32 width, uint32 height)
- => (FaceDetectionResult result);
+ => (array<FaceDetectionResult> results);
};

Powered by Google App Engine
This is Rietveld 408576698